replacePrediction {SubCellBarCode} | R Documentation

## Replace compartment predictions to neighborhood predictions

### Description

Compartment level classifications are replaced with neighborhood level assignment. It is a helper function.

### Usage

    replacePrediction(df, column = c("svm.pred.all", "Observation",
      "svm.pred"))

### Arguments

`df` | data.frame; all predictions at the compartment level and probablity vectors for each protein
`column` | character; selected column in the data frame, df

### Value

replaced.df

### Examples

    {

    #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")
    }

[Package SubCellBarCode version 1.3.4 Index]