density.normal: Method for obtaining the pdf of an 'normal' object.

View source: R/normal.R

density.normalR Documentation

Method for obtaining the pdf of an normal object.

Description

Method for obtaining the pdf of an normal object.

Usage

## S3 method for class 'normal'
density(x, ...)

Arguments

x

The object to obtain the pdf of

...

Additional arguments to pass (not used)

Value

A function that computes the pdf of the normal distribution. It accepts as input a parameter vector x, a mean vector mu, a variance-covariance matrix var, and a log argument determining whether to compute the log of the pdf. By default, mu and var are the mean and variance of object x.

Examples

x <- normal(0, 1)
f <- density(x)
f(0)
f(1)

algebraic.dist documentation built on Feb. 27, 2026, 5:06 p.m.