My error message: Error in rnorm(1000, mean = mean_value, sd = sd_value)

My error message: Error in rnorm(1000, mean = mean_value, sd = sd_value) : could not find function "rnorm"..... Do I miss to install new packages? How do I fix that? Thx It used to work until I downloaded the latest version.

rnorm() is a function from that {stats} package.

First, make sure in your code that "rnorm" is spelled correctly. If so, execute (.packages()) in your R session and make sure that "stats" is listed. (It should be -- it is installed with base R and loaded by default in every R session.) As noted by @mduvekot, rnorm is part of the stats package and should automatically be available.

1 Like