Learn R Programming

MetaLonDA (version 1.1.8)

visualizeFeature: Visualize Longitudinal Feature

Description

Visualize Longitudinal Feature

Usage

visualizeFeature(
  df,
  text,
  group.levels,
  unit = "days",
  ylabel = "Normalized Count",
  col = c("blue", "firebrick"),
  prefix = "Test"
)

Arguments

df

dataframe has the Count, Group, ID, Time

text

feature name

group.levels

The two level's name

unit

time interval unit

ylabel

text to be shown on the y-axis of all generated figures (default: "Normalized Count")

col

two color to be used for the two groups (eg., c("red", "blue")).

prefix

prefix to be used to create directory for the analysis results

References

Ahmed Metwally (ametwall@stanford.edu)

Examples

Run this code
# NOT RUN {
data(metalonda_test_data)
pfx = tempfile()
dir.create(file.path(pfx))
n.sample = 5
n.timepoints = 10
n.group = 2
Group = factor(c(rep(0, n.sample*n.timepoints), rep(1, n.sample*n.timepoints)))
Time = rep(rep(1:n.timepoints, times = n.sample), 2)
ID = factor(rep(1:(2*n.sample), each = n.timepoints))
points = seq(1, 10, length.out = 10)
aggregate.df = data.frame(Count = metalonda_test_data[1,], Time = Time, Group = Group, ID = ID)
visualizeFeature(df = aggregate.df, text = rownames(metalonda_test_data)[1], 
group.levels = Group, prefix = pfx)
# }

Run the code above in your browser using DataLab