PCMPlotGaussianSample2D: A 2D sample from Gaussian distribution

View source: R/Utilities.R

PCMPlotGaussianSample2DR Documentation

A 2D sample from Gaussian distribution

Description

A 2D sample from Gaussian distribution

Usage

PCMPlotGaussianSample2D(mu, Sigma, numPoints = 1000, ...)

Arguments

mu

numerical mean vector of length 2

Sigma

numerical 2 x 2 covariance matrix

numPoints

an integer denoting how many points should be randomly sampled (see details).

...

additional arguments passed to ggplot.

Details

This function generates a random sample of numPoints 2d points using the function rmvnorm from the mvtnorm R-package. Then it produces a ggplot on the generated points.

Value

a ggplot object


venelin/PCMBase documentation built on March 14, 2024, 8:24 p.m.