I am facing following error :
formula(formula, data = data) :
invalid model formula in ExtractVars
I am using the below code:
# you must change the below from windows to work on your linux box:
mydata <- read.csv(file="c:/Users/md79068/downloads/winequality-red.csv")
# To grow the tree
fit <- rpart(YouSweetMan ~ "residual sugar" + "citric acid", method = "class", data = mydata
Please note that I have changed the delimiters in my CSV file to commas.
I guess it is unable to read the data correctly. I am very new to the R and also a very new programmer.