replacePrediction {SubCellBarCode} | R Documentation |
Compartment level classifications are replaced with neighborhood level assignment. It is a helper function.
replacePrediction(df, column = c("svm.pred.all", "Observation", "svm.pred"))
df |
data.frame; all predictions at the compartment level and probablity vectors for each protein |
column |
character; selected column in the data frame, df |
replaced.df
{ #define mock data frame df <- data.frame(svm.pred.all = c("S1","S2","S3","S4", "N1","N2","N3","N4", "C1","C2","C3","C4","C5", "M1","M2")) df$svm.pred.all <- as.character(df$svm.pred.all) df$Prob <- "1" df <- replacePrediction(df, column = "svm.pred.all") }