l_plot: Plot each variable vs each measure of interest

Description Usage Arguments Value Examples

View source: R/experiments.R

Description

Plots each variable vs each measure listed. Can pass in a dataset from create_dataset, or function calls create_dataset itself.

Usage

1
l_plot(dataset = NA, person, variables, measures, time_var = NA)

Arguments

dataset

dataset from create_dataset that contains all variables and measures of interest

person

an instantiated Person object

variables

list of variables in person of interest, 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

measures

list of measures in person of interest, 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 that variables and measures are observed in (time, date, or datetime) - only needed if dataset is not passed in

Value

NULL - plots for each variable vs each measure are printed

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(EX)

l_plot(person = EX, variables = list("fitbit_daily" = c("sleepDuration",
                                                        "steps", "distance"),
                                     "util" = c("day_of_week", "day_type")), 
       measures = list("fitbit_daily" = c("restingHeartRate")),
       time_var = c("date"))

dataset <- create_dataset(person = EX, all_variables = list(
                                               "util" = c("month"),
                                               "fitbit_daily" = c("steps")),
                                       time_var = c("date"))
                                       
l_plot(dataset, person = EX, variables = list("util" = c("month")),
       measures = list("fitbit_daily" = c("steps")))
       
       

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