Hi, this is probably extremely basic, but any help would be much appreciated. The main problem I get is Error: Discrete value supplied to continuous scale. My dataset is called Vekt and I want to be able to create multiple lines on the Y axis similar to this in R:
This is my script so far:
library(openxlsx) Vekt <- read.xlsx("../data/Vekt.xlsx") library(ggplot2) ggplot(data = Vekt, aes(x = Week, y = Fresh)) + geom_line() ggplot(Vekt, aes(x = Week)) + geom_line(aes(y = Fresh), color = "darkred") + geom_line(aes(y = Frozen), color = "steelblue", linetype = "twodash").
Using the economics dataset in ggplot leaves me with no issues, which leads me to believe that there's something wrong with how I've imported the dataset.
> head(Vekt) Week Fresh Frozen 1 1 3728 383 2 2 4054 216 3 3 4043 633 4 4 3730 393 5 5 3831 453 6 6 4415 265
The dataset contains information of frozen and fresh food exported since 2000 in ton which is 1028 weeks for context.
I realize this is probably a terrible explanation but any help is appreciated!