create_dataset: Creates a dataset across data sources in a Person object

Description Usage Arguments Value Examples

View source: R/experiments.R

Description

Joins all variables (across sources) by time_var into one dataframe, which is returned

Usage

1
create_dataset(person, all_variables, time_var)

Arguments

person

an instantiated Person object

all_variables

list of variables in person to join, with structure list(source1 = c(var1, var2), source2 = c(var3, var4)) where source is a source of data as defined in a Person object, and var1 and var2 are variables from source1, while var3 and var4 are variables from source2

time_var

the time variable to join the datasets across (time, date, or datetime) as a character

Value

one dataframe with all variables in all_variables, joined by time_var

Examples

1
2
3
4
5
data(EX)
dataset <- create_dataset(person = EX,
                          all_variables = list("util" = c("month"),
                                               "fitbit_daily" = c("steps")),
                          time_var = c("date"))

lifelogr documentation built on May 2, 2019, 6:11 a.m.