cur_dir<-"C:/Users/child/Dropbox/Proteogenomics_analysis/Proteome and Phosphoproteome Data Normalization/Experiment_data_20230222_Metabric_multistate_analysis"
setwd(cur_dir)
library(mstate)
library(brcarepred)
id <- as.numeric(Sys.getenv("SLURM_ARRAY_TASK_ID"))
print(id)
load("./Models/FourGroupsM.RData")
timepoints <- seq(from=0, to=20, by=0.25)
pt <- list()
newdata.DR <- newdata
newdata.DR$AGE.DR[which(newdata.DR$strata %in% seq(from=9,by=9, length=4))] <-newdata.DR$AGE.DR[which(newdata.DR$strata %in% seq(from=9,by=9, length=4))] +newdata.DR$TLastSurgery[which(newdata.DR$strata %in%seq(from=8, by=9, length=4))]pt[['DR']] <- getProbsDR(m, group=id, newdata.DR, timepoints=timepoints)`
I got error message.
pt[['DR']] <- getProbsDR(m, group=id, newdata.DR, timepoints=timepoints)
Error in group:(group + 8) : NA/NaN argument
I thought that this error may be resulted from
id <- as.numeric(Sys.getenv("SLURM_ARRAY_TASK_ID"))
print(id)
[1] NA
I do not understand "Sys.getenv("SLURM_ARRAY_TASK_ID") script". Before running this script, what file should I make? If possible, explain it with an example.