I tried to apply Decision Tree classification to my dataset. I created a subset to take useful columns from the raw dataset. The columns: Basin Name, Temperature of field, pH of field. Except basin name, they are numeric. That's why I tried to change the basin name type with ifelse condition. What else can I do to get rid of this error?
library(datasets)
library(caTools)
library(party)
library(dplyr)
library(magrittr)
train <- trainData[,c(9,13,14)]
train$BASIN_NAME <- ifelse(train$BASIN_NAME == "Odra Basin", 1, 2)
colSums(is.na(train))
train <- na.omit(train)
model<- ctree(BASIN_NAME ~ ., train)
plot(model)
ctree(formula, dataset)
However, I got this error message:
Error in valid.viewport(x, y, width, height, just, gp, clip, mask, xscale, : invalid 'yscale' in viewport