calcDerivatives {deFit} | R Documentation |
Calculating the Derivatives
Description
Calculating the Derivatives
Usage
calcDerivatives(data, column, groupby, time = NA, order = 2, window = 5)
Arguments
data |
a data frame. |
column |
names of variables in the long format that correspond to multiple variables in the wide format. |
groupby |
Character vector. Only used if the data is in a data.frame. |
time |
A variable name in the data frame containing sampling time information. |
order |
integer scalar. |
window |
integer scalar.Must be an odd number |
Details
examples
#eg1. derivatives1 <- calcDerivatives(data=example3,column='expected',groupby='year',order=2,window=5,interval=1) #eg2. derivatives2 <- calcDerivatives(data=example3,column=c('expected','current'),groupby='year',time='myTime',order=2,window=5,interval=1) #eg3. derivativese3 <- calcDerivatives(data=example3,column=c('expected','current'),groupby='year',order=2,window=5,interval=1)
Value
a data frame contains derivatives.
[Package deFit version 0.3.0 Index]