Learn R Programming

xray (version 0.2)

timebased: Analyze each variable in respect to a time variable

Description

Analyze each variable in respect to a time variable

Usage

timebased(data_analyze, date_variable, time_unit = "auto",
  nvals_num_to_cat = 2, outdir)

Arguments

data_analyze

a data frame to analyze

date_variable

the variable (length one character vector or bare expression) that will be used to pivot all other variables

time_unit

the time unit to use if not automatically

nvals_num_to_cat

numeric numeric values with this many or fewer distinct values will be treated as categorical

outdir

an optional output directory to save the resulting plots as png images

Examples

Run this code
# NOT RUN {
library(xray)
data(longley)
longley$Year=as.Date(paste0(longley$Year,'-01-01'))
timebased(longley, 'Year')

# }

Run the code above in your browser using DataLab