I am new to R and just preparing uni project. My code is very simple but couldn't find out where i am doing wrong.
setwd("C:/abc")
heartFailure <- read.csv(file = 'example.csv')
df <- data.frame(heartFailure)
dfm <- melt(df[c('age','platelets')],id.vars = 1)
ggplot(dfm,aes(x=age, y=platelets)) + geom_bar()
I am getting following error and tried to find out on solution on google but couldn't get anything. Thanks in advance for any help.
Error in FUN(X[[i]], ...) : object 'platelets' not found