make_designMatrix: Creates a Model matrix.

Description Usage Arguments Value Examples

View source: R/DEG.R

Description

Creates a Model matrix.

Usage

1
2
3
4
5
6
7
make_designMatrix(
  dataset,
  cond1 = "A",
  cond2 = "B",
  ncond1 = (ncol(dataset)/2),
  ncond2 = (ncol(dataset)/2)
)

Arguments

dataset

dataframe of expression values with samples in columns and genes in row.

cond1

Name of the first experimental condition.

cond2

Name of the second experimental condition.

ncond1

Number of sample in the first experimental condition.

ncond2

Number of sample in the the second experimental condition.

Value

Model matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Import the dataset
Data = matrix(runif(5000, 10, 100), ncol=20)
group = paste0(rep(c("control", "case"), each = 10),rep(c(1:10),each = 1))
genes <- paste0(rep(LETTERS[1:25], each=10), rep(c(1:10),each = 1))
colnames(Data) = group
row.names(Data) = genes 

# Creating the design matrix
design = make_designMatrix(dataset = Data, 
                            cond1 = "control", 
                            cond2 = "Case", 
                            ncond1 = 10, 
                            ncond2 = 10)

jtcasemajor/CPRD documentation built on Dec. 21, 2021, 3:22 a.m.