Generate Mock Example Value with Temporary File
Source:R/mockdata.R
sn_get_example_value_with_mockdata.Rd
Enhanced version of .sn_get_example_value that can optionally create temporary mock files for realistic examples in documentation and help.
Usage
sn_get_example_value_with_mockdata(
datatype,
param_name = NULL,
tool_name = NULL,
input_output = "input",
create_temp_file = FALSE,
temp_dir = NULL,
size = "minimal"
)
Arguments
- datatype
Character. The datatype name.
- param_name
Character. The parameter name (for context-aware examples).
- tool_name
Character. Optional tool name for tool-specific datatypes.
- input_output
Character. Whether this is for "input" or "output".
- create_temp_file
Logical. Whether to create actual temporary mock files.
- temp_dir
Character. Directory for temporary files (default: tempdir()).
- size
Character. Size category for mock data generation.
See also
Other mock data generation:
sn_cleanup_mockdata_examples()
,
sn_generate_mockdata()
,
sn_generate_mockdata_batch()
,
sn_generate_rnaseq_dataset()
Examples
if (FALSE) { # \dontrun{
# Get regular example value
sn_get_example_value_with_mockdata("fasta")
# Create temporary mock file and return its path
temp_fasta <- sn_get_example_value_with_mockdata("fasta",
param_name = "reference", create_temp_file = TRUE
)
# Use in tool demonstration
temp_fastq <- sn_get_example_value_with_mockdata("fastq",
param_name = "input1", create_temp_file = TRUE, size = "small"
)
} # }