Learn R Programming

kronos (version 1.0.0)

gg_kronos_sinusoid: A plotting method for circadian plots using 'ggplot2'.

Description

Wrapper around 'ggplot2' to make figures with a sinusoid trace.

Usage

gg_kronos_sinusoid(kronosOut, fill = "unique_group")

Value

a 'ggplot2' compatible object.

Arguments

kronosOut

an output object from the main kronos function.

fill

The name of the variable that should be used to mark different groups. In the case of a single group, leave empty.

Examples

Run this code
#Load prepared data stored in Kronos library
data("kronos_demo")
output <- kronos(formula = Variable_1 ~ time(Timepoint), 
data = onevariable, period = 24, verbose = TRUE, pairwise = FALSE)

#Extracting data from the output object:
getKronos_fit(output)
getKronos_trace(output)
getKronos_groupwise(output)

#Plotting:
gg_kronos_circle(output)
gg_kronos_sinusoid(output)

#For high-dimensional data, use fw_kronos:
out_list = fw_kronos(x = bigdata[1:50,], formula = ~ Group + time(Timepoint), 
metadata = bigmeta, period = 24, verbose = FALSE, pairwise = TRUE) 

#Extracting data from the output object: 
kronosListToTable(out_list)


#Plotting:
gg_kronos_acrogram(out_list)

Run the code above in your browser using DataLab