R-beta: NAs etc

E. Georg Luebeck g at trex.fhcrc.org
Mon Aug 3 06:55:09 CEST 1998


Greetings,

I've been using R (on Linux i686) for some time now and have been able to accomplish a great deal of work with it. My special regards
go to all who helped to develop it and turn it into an impressive statistical package.
Keep up the good work.

A couple things involving NAs:

1. 

> y _ data.frame(x1=1:10,x2=0)
> y
   x1 x2
1   1  0
2   2  0
3   3  0
4   4  0
5   5  0
6   6  0
7   7  0
8   8  0
9   9  0
10 10  0
> y _ data.frame(x1=1:10,x2="0")
Error: arguments imply differing number of rows: 10, 1
> y _ data.frame(x1=1:10,x2=NA)
Error: arguments imply differing number of rows: 10, 1

Is this considered consistent behavior?

2.
> mean(c(NA),na.rm=T)
[1] NaN

I'd prefer an NA instead of an NaN (which should be reserved for 1/0).


Cheers,

-- 
E. Georg Luebeck,			      phone:    (206) 667-4282  	
Fred Hutchinson Cancer Research Center	      fax:      (206) 667-7004  
Division of Public Health Sciences MP-665     internet: g at trex.fhcrc.org
1100 Fairview Avenue North 
Box 19024
Seattle, Washington 98109-1024
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list