NAs introduced by coercion

hii, I am trying to plot a 3d-scatter graph , but it shows the error:

Warning in xyz.coords(x, y, z, xlab = xlabel, ylab = ylabel, zlab = zlabel, :
NAs introduced by coercion

I have attached my dataset and code files. In this user is selecting the dataset(moons.csv) and then by graphs , choosed the different column names for 3d-scatter.

here is the code of only 3d-scatter:
df <- Y()
plot3d(data=data(),X, Y , Z,col="red",size=3)

I have included the package rgl also.
please help me out to solve this...i would be highly grateful for any suggestions
Hi kavita,

frankly i do not understand the code and have never worked with shiny. Therefore please bear with me i the following is to profane or you already might have checked for it.

Everytime i do get the Warning (its not an Error as far as i know) "NAs introduced by coercion" i or R tried to use a non-numeric variable like characters or factors for a numeric operation. Maybe somewhere in your code or some function you are calling are changing a variable to character or factor.

This is all i can give.

Have a nice day



TS Contributor
Also this might very well happen when reading the dataset ... that is some variable intended to be numerical is stored as charachter for example if decimals are indicated with , rather than . or something similar