I am beginner in R. I am looking to gathering some columns for plotting. I got this error "Error: Must supply a symbol or a string as argument". I would be happy if you help me in how to fix this error.
library(readxl)
df =read_excel("a1-cereals.xls")
# Select columns
df%>% select (c(-1,-2,-11,-14,15))->df1
# Filtering rows
df_Type_C <- filter (df1, Type == "C")
head (df_Type_C)
df_Type_H <- filter (df1, Type == "H")
head (df_Type_C)
#Gathering columns to make a long table
df_long <- gather (df1,Mes_Type,2:11)
This is a sample of the dataset I am working on: