Animal-method: Animal-method

Animal-methodR Documentation

Animal-method

Description

as.data.frame method for Animal class

plot method for Animal class

statistics method for Animal class

Usage

## S3 method for class 'Animal'
as.data.frame(object)

## S3 method for class 'Animal'
plot(
  object,
  type = c("tumorVolume", "weight")[1],
  list.color = {
     list.color <- mycolor[1:7]
     names(list.color) <- paste("G",
    1:7, sep = "")
     list.color
 },
  legend.position = "right",
  label.size = 0.15,
  plot.size = 25,
  verbose = T
)

## S4 method for signature 'Animal'
statistics(
  object,
  type = c("tumorVolume", "weight")[1],
  targetTime = NULL,
  method = "wilcox.test",
  paired = FALSE,
  p.adjust.method = "BH",
  verbose = T
)

Arguments

object

Animal-class

type

One of tumorVolume and weight

list.color

A color vector with names of Group slot.

legend.position

the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector)

label.size

Size of label border, in mm.

plot.size

The size of the ggplot plot.

verbose

Whether report process and results

targetTime

Strings like '20220120'. Default is NULL, which means that every time would be considerated.

method

the type of test. Default is wilcox.test. Allowed values include:

  • t.test (parametric) and wilcox.test (non-parametric). Perform comparison between two groups of samples. If the grouping variable contains more than two levels, then a pairwise comparison is performed.

  • anova (parametric) and kruskal.test (non-parametric). Perform one-way ANOVA test comparing multiple groups.

paired

a logical indicating whether you want a paired test. Used only in t.test and in wilcox.test.

p.adjust.method

method for adjusting p values (see p.adjust). Has impact only in a situation, where multiple pairwise tests are performed; or when there are multiple grouping variables. Allowed values include "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none". If you don't want to adjust the p value (not recommended), use p.adjust.method = "none".

Note that, when the formula contains multiple variables, the p-value adjustment is done independently for each variable.

Value

a data frame

Author(s)

Weibin Huang<654751191@qq.com

See Also

Animal

Examples

list.color <- mycolor[1:7]
names(list.color) <- paste('G',1:7,sep = '')

huangwb8/luckyExperiment documentation built on June 29, 2023, 10:15 a.m.