So, I plotted this a while ago and it worked when I ran the code. However when I went to do it today it came up with the error message "Column x
must be a 1d atomic vector or a list". I don't know why as it previously worked. Can anyone help with this? Code shown below. Any help greatly appreciated! Can't find the answer anywhere on this
pax = read.csv("pax.csv", header=TRUE, sep=",")
z <- read.csv("pax2.csv", header=TRUE, sep=",")
m <- data.frame(pax)
a <-data.frame(z)
graph2 <- ggplot (data=a, aes(x=day, y=pax)) +
geom_area(stat="identity", fill="grey43") +
#geom_line(data=m, aes(x=day,y=pax))+
stat_function(fun = dnorm, args = list(mean = 0, sd = 1), aes(colour =
"Cumulative frequency distribution")) +
stat_function(fun = dnorm, args = list(mean = 0, sd = .5),aes(colour =
"Distribution of pax per total journey time"))+
scale_colour_manual("",values=c("grey50","black")) +
theme ( axis.ticks=element_blank(), legend.position="right") +
labs(fill="")