[R] ggplot error of "`data` must be a data frame, or other object coercible by `fortify()`, not an S3 object with class rxlsx"

Andrew Simmons @kw@|mmo @end|ng |rom gm@||@com
Thu Aug 26 17:56:16 CEST 2021


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 using 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 using 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]]



More information about the R-help mailing list