Learn R Programming

gmatrix (version 0.3)

gdpois: The Poisson Distribution

Description

Density and random generation for the Poisson distribution with parameter lambda.

Usage

gdpois(x, lambda, log = FALSE, type = "d") grpois(n, lambda)

Arguments

x
vector of (non-negative integer) quantiles
n
number of random values to return
lambda
vector of (non-negative) means
log
logical; if TRUE, probabilities p are given as log(p)
type
specify the type; may be "double", "single" (or short form "d" or "s")

Value

gdpois gives the (log) density, and grpois generates random deviates.

Details

Very similar to the R stats functionality.

See Also

dpois

Examples

Run this code
myRndNums = grpois(10,4)

Run the code above in your browser using DataLab