Thanks Uwe. I definitely want to replace the NaN, unless someone has a better idea. I have a couple of lists of label-value pairs that come from a randomForest object. I plot a series of precision- recall curves (not really curves but zig-zags) from x and y lists that came from multiple randomForest runs. I want to make the comparison between the runs clearer than just plotting the zig-zags on top of each other, so I tried a curve smoother like lowess. Lowess doesn't like NaN's. Replacing the first one in the list with something that is just after it, lets the smoother work and doesn't really change the comparison between the runs.
2012/2/25 Uwe Ligges <lig...@statistik.tu-dortmund.de> > > > On 24.02.2012 17:41, Chet Seligman wrote: > >> The first item in @ y.values is a NaN >> Slot "y.values": >> [[1]] >> [1] NaN 1.0000000 >> >> How do replace it with 1.000000 or otherwise get rid of it? >> > > > I wonder if you really want to do that,m but if so, you can replace it by: > > object@y.values[[1]][1] <- 1 > > Uwe Ligges > > > > > Chet >> >> [[alternative HTML version deleted]] >> >> ______________________________**________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> >> PLEASE do read the posting guide http://www.R-project.org/** >> posting-guide.html <http://www.R-project.org/posting-guide.html> >> and provide commented, minimal, self-contained, reproducible code. >> > [[alternative HTML version deleted]] ______________________________________________ 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.