CompEllipse: Uncertainty Elipses Computations

Description Usage Arguments Value Examples

Description

Computes the datapoints in order to plot uncertainty elipses

Usage

1
CompEllipse(x, xsd, y, ysd)

Arguments

x

vector of x values

xsd

vector of xsd values (specifies the width of the elipse)

y

vector of y values

ysd

vector of ysd values (specifies the height of the elipse)

Value

dataframe of Ellipse x-y points

Examples

1
2
3
4
5
6
Data <- data.frame(x=seq(1:10), xsd=runif(10), y=rnorm(n=10), ysd=runif(10))
Ellipse <- CompEllipse(x=Data$x, xsd=Data$xsd, y=Data$y, ysd=Data$ysd)
p <- ggplot()+
    geom_point(data=Data, aes(x=x, y=y))+
    geom_polygon(data=Ellipse,aes(x=xEll,y=yEll, group=obs), alpha=.15)
print(p)

sbujarski/SpPack documentation built on Sept. 24, 2020, 5:54 p.m.