circ_compare_groups {card} | R Documentation |
Takes data and returns a summary table of continuous variable based on a categorical variable. This summary is repeat by time groups to help describe a circadian pattern.
circ_compare_groups(data, x, y, time)
data |
Dataframe containing all the following variables |
x |
Continuous variable of interest (x ~ y) |
y |
Grouping variable to apply to the |
time |
Name of the time-dependent variable, usually hours |
Applies a simple data transformation to identify the summary statistics of the data frame by the stated variables. Results in a mean, standard deviation, and standard error term. This data is also used for making a t-test based table, which can then also be graphed in card::ggcircadian.
Returns a dataframe that has the time variable, the categorical variable, and the statistics (including p-value) of the continuous variable
data("twins") circ_compare_groups(data = twins, x = "rDYX", y = "sad_cat", time = "hour")