Description Usage Arguments Details Value Author(s) References Examples

Fits the moving window quadratic (or linear) regression model for each continuous variable in a data frame, and calculates summary statistics of the parameters. Also calculates the duration and transition features of discrete variables.

1 2 3 |

`y` |
Data frame, each row containing a vector of measurements for a particular point in time, with columns indicating the discrete and/or continuous measured variables (and possibly other descriptive variables). The data processed presuming the rows are orderd chronologically. |

`cont` |
Vector of integers or a character vector indicating the columns
of |

`disc` |
Vector of integers or character vector indicating the columns
of |

`centerScale` |
Logical indicating whether the continuous variables (indicate by |

`stats` |
This argument defines the summary statistics that will be calculated
for each of the regression parameters. It can be a character vector of summary statistics,
which are passed to |

`fitQargs` |
Named list of arguments for |

A least one of `cont`

or `disc`

must be specified.

Instead of a data frame, the `y`

argument can be a
`valid_getFeatures_args`

object (returned by `check_getFeatures_args`

), in which
case all the subsequent arguments to `getFeature`

are ignored
(because the `valid_getFeatures_args`

object contains all those arguments). This is useful
if `getFeatures`

is called repeatedly over the same set of argument values (which occurs
in `ddply_getFeatures`

.

A named vector containing the features for each of the variables
requested in `cont`

and `disc`

. The names follow the form
[varname].[description], where the [varname] is specified in `cont`

and
`disc`

, and [description] follows the naming convention produced by
`summary.fitQ`

and `discFeatures`

.

Landon Sego

Amidan BG, Ferryman TA. 2005. "Atypical Event and Typical Pattern Detection within Complex Systems." IEEE Aerospace Conference Proceedings, March 2005.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
# Load the data
data(demoData)
# Select a subset of thedata
d <- demoData[demoData$subject == 3 & demoData$phase == "f",]
colnames(d)
# Run over that subset
features <- getFeatures(d, cont = 3:4, disc = 8:11, stats = c("mean", "sd"),
fitQargs = list(x1 = -5:5, start = 2))
str(features)
features
# We can also call the function by validating the arguments before hand:
validated <- check_getFeatures_args(d, cont = 3:4, disc = 8:11, stats = c("mean", "sd"),
fitQargs = list(x1 = -5:5, start = 2))
features1 <- getFeatures(validated)
# We get the same result
identical(features1, features)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.