Commit 4741b83
Fix critical issues with resources functionality
ISSUES FIXED:
1. Installed packages resource error: 'subscript out of bounds'
- Problem: installed.packages() doesn't always have 'Title' column
- Solution: Check available columns before subsetting
- Now safely handles packages with missing Title information
2. All help resources showing same content (closure bug)
- Problem: All help functions captured same topic variable from loop
- Solution: Use force() to create proper closure for each topic
- Each help resource now shows correct, unique content
VALIDATION:
- /r/packages now returns package list without errors
- /help/mean shows 'Arithmetic Mean' (not 'Fitting Linear Models')
- /help/lm shows 'Fitting Linear Models'
- /help/summary shows 'Object Summaries'
- All 45 resources tests still passing
Critical fixes for production-ready resources functionality.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 04dfdeb commit 4741b83
1 file changed
Lines changed: 23 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
469 | 477 | | |
470 | 478 | | |
471 | 479 | | |
| |||
478 | 486 | | |
479 | 487 | | |
480 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
481 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
482 | 496 | | |
483 | 497 | | |
484 | | - | |
| 498 | + | |
485 | 499 | | |
486 | | - | |
| 500 | + | |
487 | 501 | | |
488 | 502 | | |
489 | 503 | | |
| |||
504 | 518 | | |
505 | 519 | | |
506 | 520 | | |
507 | | - | |
| 521 | + | |
508 | 522 | | |
509 | 523 | | |
510 | 524 | | |
511 | 525 | | |
512 | 526 | | |
513 | | - | |
| 527 | + | |
514 | 528 | | |
515 | 529 | | |
516 | | - | |
| 530 | + | |
517 | 531 | | |
518 | 532 | | |
519 | 533 | | |
520 | 534 | | |
521 | 535 | | |
522 | | - | |
| 536 | + | |
523 | 537 | | |
524 | 538 | | |
525 | | - | |
| 539 | + | |
526 | 540 | | |
527 | 541 | | |
528 | 542 | | |
| |||
0 commit comments