To apply an example in R, you can follow these steps:
R console or an R script editor.Here is an example code that demonstrates the use of rnorm() function to generate random normal distribution:
main.r201 chars4 lines
By typing or running this code in R, you will generate a histogram of a normal distribution with mean of 10 and standard deviation of 2, based on 100 randomly generated data points. This is an example of learning-by-doing, where you apply a concrete example to understand the syntax and behavior of a function in R.
gistlibby LogSnag