Learn R Programming

searchAnalyzeR (version 0.1.0)

gen_repro_seed: Generate Reproducible Random Seed

Description

Generate Reproducible Random Seed

Usage

gen_repro_seed(base_string = "searchAnalyzeR")

Value

Integer seed value

Arguments

base_string

Base string for seed generation

Details

This function generates a reproducible seed based on a string input. It does not set the seed automatically - users should call set.seed() themselves if they want to use the generated seed.

Examples

Run this code
# Generate a seed value
seed_value <- gen_repro_seed("my_analysis")

# User can choose to set it
# \donttest{
set.seed(seed_value)
sample(1:10, 3)
# }

Run the code above in your browser using DataLab