BI_pair.random: pair.random

Description Usage Arguments Author(s) Examples

Description

a simple method to make random-matched pair data by giving a contrast.

Usage

1
2
3
4
5
6
7
  pair.random(data,
              contrast,
              cluster,
              seed = 2018,
              ratio=0.2,
              pair = TRUE,
              summary = T)

Arguments

contrast

string.colnames.

seed

seed used in sample()

pair

logic.If T,give a random-matched pair data by giving a contrast

summary

logic.If T,give a simple data.

Author(s)

Weibin Huang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(data.selfprocess2.2)
colnames(data.selfprocess2.2)
pr1 <- pair.random(data=data.selfprocess2.2,
                   contrast="N.status",
                   cluster=c("T.status","gender.status","age.status"),
                   seed = 2018,
                   ratio=0.5,
                   pair = TRUE,
                   summary = T)
View(pr1)

shijianasdf/BasicBioinformaticsAnalysisFromZhongShan documentation built on Jan. 3, 2020, 10:08 p.m.