I have the following
remove(list = ls())
train <- read.csv("RegressionTrain.csv" )
library(dplyr)
df <- as.data.frame.matrix(train)
arrange(df$No.Cylinders) %>% glimpse()
I get
Error in UseMethod("arrange_"): no applicable method for 'arrange_' applied to an object of class "c('integer', 'numeric')"
Traceback:
1. arrange(df$No.Cylinders) %>% glimpse()
2. eval(lhs, parent, parent)
3. eval(lhs, parent, parent)
4. arrange(df$No.Cylinders)
5. arrange.default(df$No.Cylinders)
6. arrange_(.data, .dots = compat_as_lazy_dots(...))
A similar problem occurs if I try to arrange data$No.Cylinders hence I tried creating a data frame.