visualizeFeature: Visualize Longitudinal Feature

Description Usage Arguments References Examples

Description

Visualize Longitudinal Feature

Usage

1
2
3
4
5
6
7
8
9
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

aametwally/MetaLonDA documentation built on Dec. 26, 2019, 7:46 a.m.