contrast_rsa_model
function:output_metric
parameter documentation to show it accepts a character vector✅ Documented that duplicates are removed while preserving first-occurrence order
Updated documentation for train_model.contrast_rsa_model
:
✅ Explained structure and naming conventions for returned elements
Fixed dependency handling:
requireNamespace("crayon")
guard clause in print.contrast_rsa_model
@importFrom crayon
tagstrain_model.contrast_rsa_model()
showing the returned list structure⬜ Update any other examples that use output_metric
to reflect it's now a vector
S3 methods documentation:
⬜ Link S3 methods to their generics using @rdname
Dependencies:
requireNamespace()
calls that need fixingoutput_metric
parameter:output_metric
accepts a character vector not just a single string[x] Update return value documentation to explain how multiple metrics are returned in a list
train_model.contrast_rsa_model:
[ ] Appropriate cross-references to related functions
[ ] Properly document S3 generics and methods:
@rdname
to link methods to their generictrain_model()
@rdname train_model
for all methods[ ] Add method-specific details for parameters unique to each method
merge_results()
[ ] Add method specifics for contrast_rsa_model to handle multiple metrics
print()
methods
print.contrast_rsa_model
shows multiple metrics correctlyget_unique_regions()
strip_dataset()
select_features()
format_result()
merge_results()
run_future()
process_roi()
train_model()
y_train()
y_test()
test_design()
fit_model()
tune_grid()
has_test_set()
has_crossval()
performance()
compute_performance()
merge_classif_results()
get_samples()
data_sample()
as_roi()
get_searchlight()
wrap_output()
merge_predictions()
sub_result()
nobs()
prob_observed()
nresponses()
predict_model()
run_searchlight()
run_regional()
crossval_samples()
pairwise_dist()
filter_roi()
get_nfolds()
train_indices()
balance_partitions()
print()
For each generic above: 1. On the generic function: - [ ] Document all parameters - [ ] Provide a comprehensive description - [ ] Document the return value structure - [ ] Include a basic example
@rdname generic_name
to link to the generic's documentation\dontrun{}
(CRAN will reject)\donttest{}
for long-running examplescontrast_rsa_model
, include an example showing multiple metrics:
r
model_multi_metric <- contrast_rsa_model(
dataset = mvpa_dat,
design = msreve_des,
output_metric = c("beta_delta", "recon_score", "beta_only")
)
requireNamespace()
except for packages in Suggests
requireNamespace()
checks to proper Imports
fielddevtools::document()
to generate documentationR CMD check
to validate documentation against CRAN requirementsAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.