The class of 'eth' must be incorrect. You could try 'as.data.frame' or possibly 'as.list' to convert 'eth' to an acceptable form.
On Thu, Aug 26, 2021, 11:53 Kai Yang via R-help <r-help@r-project.org> wrote: > Hello List, > I got an error message when I submit the code below > ggplot(eth, aes(ymax=ymax, ymin=ymin, xmax=4, xmin=3, fill=ethnicity)) + > geom_rect() + coord_polar(theta="y") + xlim(c(2, 4) ) > > Error: `data` must be a data frame, or other object coercible by > `fortify()`, not an S3 object with class rxlsx > > > I checked the syntax. But I can not find any error on my code. Can you > help me to find where is the problem? > > Thanks > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.