Struggling with line graph

I am currently attempting to plot a line graph of this data using R studio, but am coming across a load of problems and errors, and just wondered if anyone had an idea where I am going wrong? Thanks so much

install.packages("ggplot2")
library(ggplot2)
install.packages("tidyverse")
library(tidyverse)

ggplot(FINALDATA, aes(x = JAF, y = Read_Depth, linetype = Power, colour = Power, shape = Power)) +

geom_line(lwd = 1.5) + 

geom_point(size = 4) +

scale_linetype_manual(values = c("solid", "longdash")) +

scale_color_manual(values = c("#FF0000", "#0000FF")) +

scale_shape_manual(values = c(19, 17)).

It is giving me an error saying that the line type cannot be continuous. This variable is power percentage with 3 different categories. Thank you all

Can you please share a small part of the data set in a copy-paste friendly format?

In case you don't know how to do it, there are many options, which include:

  1. If you have stored the data set in some R object, dput function is very handy.

  2. In case the data set is in a spreadsheet, check out the datapasta package. Take a look at this link.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.