I want to draw multiple graph using R code with different data files(a.xlsx, b.xlsx, c.xlsx).
I already make a code using R. But it occurs the error.
Let me know how to solve this error.
'''Example R code'''
library(readxl)
library(ggplot2)
a <- read_excel("D:/a.xlsx")
b <- read_excel("D:/b.xlsx")
c <- read_excel("D:/c.xlsx")
plot1 <- ggplot(a, aes(x=aaa, y=bbb)) + geom_line()
plot2 <- ggplot(b, aes(x=aaa, y=bbb)) + geom_line()
plot3 <- ggplot(c, aes(x=aaa, y=bbb)) + geom_line()
pt <- rbind(plot1, plot2, plot3)
ggplot(pt, aes(x=aaa, y=bbb)) + geom_line() + geom_point() + geom_line(aes(color=type))
#Error Message
> ggplot(plot1, aes(x=SCvector, y=qNetvector)) + geom_line()
ERROR : `data` must be a data frame, or other object coercible by `fortify()`, not an S3 object with class gg/ggplot
Run rlang::last_error()
to see where the error occurred.