On 05/03/2013 11:49 PM, Vahe nr wrote:
Hi all,
I have a big .csv file (21Mb with 1000000 rows) it has this shape:
x
1 NaN
2 NaN
3 0.23
and so on.....
So the first column has x as a header then row number, the second column
contains values between -1,1 and NaN for empty values.
What should I need to do is: create a new .csv file from this one excluding
NaN values and plot a line graph using the new .csv file.
Or can I use the old .csv file to plot a graph excluding NaN values.
Hi Vahe,
If you want to plot the line ignoring the NaN values, rather than having
the line break at each NaN, use this:
vndat<-data.frame(1:10,
x=c(-1,-0.6,-0.4,NaN,-0.2,0.2,0.4,NaN,0.6,0.8))
plot(vndat$x[complete.cases(vndat$x)],type="l")
Jim (the other one)
______________________________________________
R-help@r-project.org mailing list
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.