paprbag
paprbag copied to clipboard
Error in loading classifier_all.rds data
library(paprbag) library(ranger)
define your path to the previously saved forest
Path2Forest <- "pre-trained_forests/classifier_all.rds"
define independent prediction data
Path2ReadFiles <- "Reads/"
define output
OutputFilename <- "prediction_paprbag" saveLocation <- "predictions/" Predictions_paprbag <- Predict.ReadSet.fromFiles(Path2Forest = Path2Forest, Path2ReadFiles = Path2ReadFiles, saveLocation = saveLocation, OutputFilename = OutputFilename, Return.Predictions = T, Save.AsTSV = F, num.threads = 4, verbose = T) Error in readRDS(Path2Forest) : ReadItem: unknown type 0, perhaps written by later version of R
The error message points to a incompatible R version. Which version are you using? The data was built with R version 3.4.4.
Also what happens when you just try
forest <- readRDS(Path2Forest)
?