Hi thank you for your reply. However, there are more than 100k 0 values in the data and it's too labour intensive to remove them one by one. Is there another way which I can do this without manipulating data?
Hello, Asking for help from R experts here. I'm totally new in R and I'm just spending lots of time to figure out how to plot scatter plots on R. I have a large data set (>10K rows) which I wish to plot out the data using a scatter plot using this function on the tutorial: http://www.statmethods.net/graphs/scatterplot.html
plot(wt, mpg, main="Scatterplot Example", xlab="Car Weight ", ylab="Miles Per Gallon ", pch=19)
However, my dataset contains many '0' which causes the plot to look strange and wish to have them omitted. How can I do that please? Thanks!
1 answer
Most straightforward is to first create a new matrix/dataframe/vector from which you remove those values you don't like. So this problem comes down to subsetting your data container. But make sure to be transparent in these changes, since you are more or less 'manipulating' your data.
You can slice or subset your dataframe, obviously not manually but with an R command.
Log in to answer this question.