Skip to contents

Function used to test and parse a formula used in different functions in the annex package.

Usage

annex_parse_formula(f, verbose = FALSE)

Arguments

f

object of class Formula.

verbose

logical, defaults to FALSE. Can be set to TRUE to increase verbosity.

Value

Returns a list with three components, namely vars (the variables to aggregate), time (name of the datetime variable) and group (grouping variables).

See also

annex

Author

Reto Stauffer

Examples

require("Formula")
#> Loading required package: Formula
annex:::annex_parse_formula(Formula(T + RH ~ datetime | study + room + home))
#> $vars
#> [1] "T"  "RH"
#> 
#> $time
#> [1] "datetime"
#> 
#> $group
#> [1] "study" "room"  "home" 
#>