rnorm {FLCore} | R Documentation

## Method rnorm

### Description

Generates random numbers following a normal distribution. mean and sd can be specified as objects of class `FLQuant-class`, of the same dimensions, but any of the two could be given as a numeric. In this case the value will be reused accordingly.

### Generic function

rnorm(n, mean, sd)

### Methods

signature(n=numeric,mean=FLQuant,sd=FLQuant) :
  `n` is the number of iterations of the return object. `mean` and `sd` are FLQuant objects and must be of equal size. When both `sd` and `mean` are specified the returned object is an FLQuant object with `n` iterations, filled with randomly generated numbers. When only 1 of `mean` or `sd` is supplied the return object is a vector of length `n`.
signature(n=numeric,mean=numeric,sd=FLQuant) :
  same as above, but dimensions will be given by sd, and mean will be reused accordingly.
signature(n=numeric,mean=FLQuant,sd=numeric) :
  same as above, but instead dimensions will be given by mean, and sd will be reused accordingly.
signature(n=numeric,mean=FLQuantPoint,sd=missing) :
  uses an FLQuantPoint to obtain mean and sd from the mean and var iterations.

### Author(s)

The FLR Team

### See Also

rnorm, FLQuant-class, FLQuantPoint-class

### Examples

       data(ple4)
       rnorm(10,mean=harvest(ple4)[,"2001"], sd=harvest(ple4)[,"2001"])

[Package FLCore version 2.2 Index]