Learn R Programming

HydroPortailStats (version 1.1.0)

GetPdf: Probability Density Function (pdf)

Description

Evaluates the pdf of a distribution

Usage

GetPdf(y, dist, par, log = FALSE)

Value

The pdf or the log-pdf as a numeric.

Arguments

y

numeric, value at which the pdf is evaluated

dist

character, distribution name

par

numeric vector, parameter vector

log

logical, returns log-pdf if TRUE

Examples

Run this code
GetPdf(0,'Normal',c(0,1))
GetPdf(200,'GEV',c(100,25,-0.2))
GetPdf(200,'GEV',c(100,25,0.2))
GetPdf(3,'Poisson',0.75)

Run the code above in your browser using DataLab