Re: [R] is.integer() function

From: Barry Rowlingson <B.Rowlingson_at_lancaster.ac.uk>
Date: Thu 26 Jan 2006 - 05:10:27 EST

Duncan Murdoch wrote:

> Here "numeric vector" is being used in the R-specific technical sense as
> a vector of double precision values, so the documentor was trying hard
> to be precise. The problem is that English also admits the
> interpretation in a non-technical sense as a vector of numbers. I
> believe your country is to blame for the language. :-)

  But can "numeric vector" in the "R-specific technical sense" also mean a vector of integer (representation) values? It passes is.numeric() and is.vector():

 > x=1:3
 > is.numeric(x)
[1] TRUE
 > is.vector(x)
[1] TRUE
 > is.integer(x)
[1] TRUE   Unless by the "R-specific technical sense of 'numeric vector'" you dont mean something for which is.numeric() and is.vector() are both true. Which is perverse. But then large chunks of R are. Anyway, is this right:

is.RSpecificTechnicalSenseNumericVector=function(v){is.numeric(v) & is.double(v)}

Barry



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jan 26 05:17:39 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:10 EST