Could you please have a look on this code?
cereals<- subset(cereals, select=-c("name",
"rating",
"cups",
"weight",
"type",
"fat",
"sodium",
"fiber",
"carbo",
"potass"))
My excel file does have this columns and I need to remove those in R, however it pops up with the error message below:
Error in -c("name", "rating", "cups", "weight", "type", "fat", "sodium", :
invalid argument to unary operator
Would appreciate your help