Learn R Programming

RMOPI (version 1.1)

StackForPlot: Rearrange the data from LogErrorCosPdf for plot

Description

Rearrange the data from LogErrorCosPdf for plot

Usage

StackForPlot(error, a, b, N)

Value

Suitable tibble data for plot by group in ggplot

Arguments

error

return of LogErrorCosPdf

a

the lower limit of the truncation interval

b

the upper limit of the truncation interval

N

the number of cos term for summation

Examples

Run this code
N <- c(1:200)
L <- c(10, 20, 60, 100, 1000)
a <- -L / 2
b <- L / 2
x <- seq(-5, 5, by = 10 / (32 - 1))
el <- LogErrorCosPdf(x, dnorm, NormChf, a, b, N)
StackForPlot(el, a, b, N)

Run the code above in your browser using DataLab