eventInterp: Interpret during events

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Identify events such as strings of NA and then linearly interpolating across them

Usage

1
eventInterp(dat, event, clip = "none", na.rm = FALSE, nas = FALSE, duration = NULL)

Arguments

dat

data set that the interpolated dataset will go into

x

A logical statement in which the output is TRUE or FALSE

clip

Defaults to "none", If set to "buffer" a false if placed on each end of the string,if set to TRUE the data is clipped to the first and last time when the event did not occur

na.rm

TRUE/FALSE should NAs be handled

nas

if na.rm is set to true, what should NAs be replaced with TRUE/FALSE

duration

Numeric number selecting the minimum duration of an event

Details

See description of event

Value

Returns a vector the same length as the original dataset, yet values are linearly interpolated where the event is true

Author(s)

Connor F. White

See Also

event, eventMean

Examples

1
2
3
data<-c(.5,.6,.75,NA,NA,NA,.6,.9,.8,.7)

eventInterp(dat=data,x=is.na(data))

ConnorFWhite/AssFunc documentation built on May 20, 2019, 4:07 p.m.