Error : Removed N rows containing non-finite values (stat_pie)

Hello,
I have to do some statistics on a world map with R but I am a beginner on this software. I tried to find out by myself (on internet) where this error message could come from : I think I misunderstand how scatterplot works or maybe my data is incorrectly formatted. I am posting various screenshots here. Thanks for your help and patience.

Code :

geodata <-read.table('R_Data_Map_Chrm3.tsv',sep="\t") 
geodata2.0 <-geodata[,-9]
names(geodata2.0)[1]<-"long" 
names(geodata2.0)[2]<-"lat" 
names(geodata2.0)[3]<-"antibiotic target replacement"
names(geodata2.0)[4]<-"antibiotic efflux" 
names(geodata2.0)[5]<-"antibiotic inactivation" 
names(geodata2.0)[6]<-"antibiotic efflux reduced permeability to antibiotic"
names(geodata2.0)[7]<-"antibiotic target protection" 
names(geodata2.0)[8]<-"antibiotic target alteration"
geo <- map_data("world") 

ggplot() + geom_polygon(data = geo, aes(x = long, y = lat, group = group), colour = "grey", fill = "white") + geom_scatterpie(data = geodata2.0, aes(x=long, y=lat), cols = c("antibiotic target replacement","antibiotic efflux","antibiotic inactivation","antibiotic efflux reduced permeability to antibiotic","antibiotic target protection","antibiotic target alteration"))

Results : Warning message : Removed 294 rows containing non-finite values (stat_pie).

Hi!

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

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.