FastScore: Fast way to calculate scores for multiple markers

Description Usage Arguments Value Author(s) See Also Examples

View source: R/BI_FastImmuScore.R

Description

Fast way to calculate scores for multiple markers

Usage

1
FastScore(data, marker, time, status, cutoff, score)

Arguments

data

a data frame

marker

the colnames of markers

time

the colname of time value for survival data

status

the colname of status value for survival data

cutoff

a list of cutoff for classification of each marker.See example please

score

a list of score for classification of each marker.See example please

Value

a LuckyList

Author(s)

Weibin Huang<654751191@qq.com>

See Also

FastSurvplot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## This is a simulative process and available only with CORRECT VARIABLES
data <- readxl::read_xlsx("E:/RCloud/Experimental meterials/others/lijin/immu_lijin.xlsx")
data <- as.data.frame(data,stringAsFactor = F)
data$OS <- as.numeric(as.character(data$OS))
data$Osoutcome <- as.numeric(as.character(data$Osoutcome))
data$DFS <- as.numeric(as.character(data$DFS))
data$DFSoutcome <- as.numeric(as.character(data$DFSoutcome))
colnames(data)[1:4] <- c("I3","M3","I8","M8")
marker = c("I3","M3","I8","M8")
time = "OS"
status = "Osoutcome"
## 3 cutoff(n)
cutoff <- list(I3 = c(25,50,75)/100,
               M3 = c(25,50,75)/100,
               I8 = c(25,50,75)/100,
               M8 = c(25,50,75)/100)
## 4 scores(n+1)
score <- list(I3 = c(1,2,3,4),
              M3 = c(1,2,3,4),
              I8 = c(1,2,3,4),
              M8 = c(1,2,3,4))

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