Displaying 20 results from an estimated 10000 matches similar to: "NA and NaN question"
2008 Sep 23
5
xyplot problem
Hi all,
I am trying to produce some panels with dots in an X/Y plane where the
diameter of the dots indicates a Z value (like e.g. earthquake maps where dot
sizes indicate magnitudes and X/Y the location).
This works fine with xyplot, e.g.:
xyplot(1:3~1:3,cex=1:3,pch=16)
However, when I do this with a panel variable, e.g.:
x<-rep(1:3,5)
y <- rep(1:3,5)
sz <- rep(1:5,each=3)
grp
2011 Dec 19
2
nlrob problem
Dear all,
I am not sure if this mail is for R-help or should be sent to R-devel
instead, and therefore post to both.
While using nlrob from package 'robustbase', I ran into the following
problem:
For psi-functions that can become zero (e.g. psi.bisquare), weights in
the internal call to nls can become zero. Example:
d <- data.frame(x=1:5,y=c(2,3,5,10,9))
d.nlrob <-
2006 Dec 18
2
Error compiling on HP-UX
Dear all,
I hope this is the right mailing list for my question -- I felt that this was
too technical for R-help.
I am trying to compile R-2.4.0 on a HP-UX system:
./configure
MAKE=gmake --prefix=$HOME --without-x --without-tcltk --disable-R-profiling --without-readline --disable-multibyte
R is now configured for ia64-hp-hpux11.23
Source directory: .
Installation directory:
2020 Jan 01
2
New R function is.nana = is.na & !is.nan
Hello R-devel,
Best wishes in the new year. I am writing to kindly request new R
function so NA_real_ can be more easily detected.
Currently if one wants to test for NA_real_ (but not NaN) then extra
work has to be done: `is.na(x) & !is.nan(x)`
Required functionality is already at C level so to address my request
there is not that much to do.
Kevin Ushey made a nice summary of current R C api
2020 Jan 02
1
New R function is.nana = is.na & !is.nan
"nana" is meant to express "NA, really NA".
Your suggestion sounds good.
On Thu 2 Jan, 2020, 3:38 AM Pages, Herve, <hpages at fredhutch.org> wrote:
> Happy New Year everybody!
>
> The name (is.nana) doesn't make much sense to me. Can you explain it?
>
> One alternative would be to add an extra argument (e.g. 'strict') to
> is.na(). FALSE by
2008 Apr 11
4
Object.isNumber() returns true on NaN??
Hi,
Object.isNumber() returns true on NaN. I don''t think that''s true....
NaN is Not a Number so it''s not a number... right?
By the way, I''m using Prototype 1.6.0.2.
Satoru
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.
To post to this
2004 Sep 07
2
noncommutative addition: NA+NaN != NaN+NA
Hi guys.
Check this out:
> NaN +NA
[1] NaN
> NA + NaN
[1] NA
I thought "+" was commutative by definition. What's going on?
> R.version
_
platform powerpc-apple-darwin6.8
arch powerpc
os darwin6.8
system powerpc, darwin6.8
status
major 1
minor 9.0
year 2004
month 04
day 12
language R
>
(Both give NA under linux, so it looks
2010 Mar 30
2
simple loop iteration
Hi R mailing list,
probably a very basic problem here, I try to do the following:
> Q<-c(1,2,3)
> P<-c(4,5,6)
> A<- data.frame(Q,P)
> A
Q P
1 1 4
2 2 5
3 3 6
this is my simplified data.frame (matrix) now I try to create following
loop for subtraction of element within the data.frame:
> for(i in length(A[,"P"]-1){
delta[i]<-
2018 Jan 15
1
max and pmax of NA and NaN
Dear R users,
is the following OK?
> max(NA, NaN)
[1] NA
> max(NaN, NA)
[1] NA
> pmax(NaN, NA)
[1] NA
> pmax(NA, NaN)
[1] NaN
...or is it a bug? Documentation says that NA has a higher priority over
NaN.
Best regards, Michal Burda
[[alternative HTML version deleted]]
2018 Jul 02
2
base::mean not consistent about NA/NaN
Hi,
base::mean is not consistent in terms of handling NA/NaN.
Mean should not depend on order of its arguments while currently it is.
mean(c(NA, NaN))
#[1] NA
mean(c(NaN, NA))
#[1] NaN
I created issue so in case of no replies here status of it can be looked up
at:
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17441
Best,
Jan
[[alternative HTML version deleted]]
2009 Apr 30
2
NA_real_ <op> NaN -> NA or NaN, should we care?
On Linux when I compile R 2.10.0(devel) (src/main/arithmetic.c in
particular)
with gcc 3.4.5 using the flags -g -O2 I get noncommutative behavior when
adding NA and NaN:
> NA_real_ + NaN
[1] NaN
> NaN + NA_real_
[1] NA
If I compile src/main/arithmetic.c without optimization (just -g)
then both of those return NA.
On Windows, using a precompiled R 2.8.1 from CRAN I get
NA for
2011 May 26
2
NaN, Inf to NA
Hi,
I want to recode all Inf and NaN values to NA, but I;m surprised to see the
result of the following code. Could anybody enlighten me about this?
> df <- data.frame(a=c(NA, NaN, Inf, 1:3))
> df[is.infinite(df) | is.nan(df)] <- NA
> df
a
1 NA
2 NaN
3 Inf
4 1
5 2
6 3
>
Thanks!
Cheers!!
Albert-Jan
2011 May 26
2
NaN, Inf to NA
Hi,
I want to recode all Inf and NaN values to NA, but I;m surprised to see the
result of the following code. Could anybody enlighten me about this?
> df <- data.frame(a=c(NA, NaN, Inf, 1:3))
> df[is.infinite(df) | is.nan(df)] <- NA
> df
a
1 NA
2 NaN
3 Inf
4 1
5 2
6 3
>
Thanks!
Cheers!!
Albert-Jan
2009 Dec 31
2
Benefit of treating NA and NaN differently for numerics
Hello,
I notice in main/arithmetic.c, that NA and NaN are encoded
differently(since every numeric NA comes from R_NaReal which is
defined via ValueOfNA)
. What is the benefit of treating these two differently? Why can't NA
be a synonym for NaN?
Thank you
Saptarshi
(R-2.9)
2007 Aug 29
1
NA and NaN in function identical
The help page for function identical says:
'identical' sees 'NaN' as different from 'as.double(NA)', but all
'NaN's are equal (and all 'NA' of the same type are equal).
However, we have
x <- NaN
y <- as.double(NA)
x # [1] NaN
y # [1] NA
identical(x,y) # [1] TRUE
In my opinion, NaN and as.double(NA) should be distinguished as the
2018 Jan 20
1
max and pmax of NA and NaN
Extremes.Rd, that documents 'max' and 'pmax', has this in "Details" section, in the paragraph before the last.
By definition the min/max of a numeric vector containing an NaN is NaN, except that the min/max of any vector containing an NA is NA even if it also contains an NaN.
------------------
>>>>> Michal Burda <michal.burda at centrum.cz>
2010 Mar 31
2
Should as.complex(NaN) -> NA?
I'm having trouble grokking complex NaN's.
This first set examples using complex(re=NaN,im=NaN)
give what I expect
> Re(complex(re=NaN, im=NaN))
[1] NaN
> Im(complex(re=NaN, im=NaN))
[1] NaN
> Arg(complex(re=NaN, im=NaN))
[1] NaN
> Mod(complex(re=NaN, im=NaN))
[1] NaN
> abs(complex(re=NaN, im=NaN))
[1] NaN
and so do the following
> Re(complex(re=1,
2017 Jun 01
1
Restore a node in a replicating Gluster setup after data loss
Hi
We have a Replica 2 + Arbiter Gluster setup with 3 nodes Server1,
Server2 and Server3 where Server3 is the Arbiter node. There are several
Gluster volumes ontop of that setup. They all look a bit like this:
gluster volume info gv-tier1-vm-01
[...]
Number of Bricks: 1 x (2 + 1) = 3
[...]
Bricks:
Brick1: Server1:/var/data/lv-vm-01
Brick2: Server2:/var/data/lv-vm-01
Brick3:
2002 May 14
2
NaN/NA and sprintf double format
With a (late prerelease of) 1.5.0 on Windows, using sprintf on NaN
yields garbage when the number of decimal is specified while it
works fine for NA:
> sprintf("%.2f", NA)
[1] "0.00"
> sprintf("%.2f", NaN)
[1] "-1.#J"
Not specifying the decimal precision lets both print garbage:
> sprintf("%f", NaN)
[1] "-1.#IND00"
>
2011 Sep 11
2
how to remove NA/NaN/Inf in a matrix??
Hi all..
I'm very new R, and i'm analyzing microarray data using Bioconductor..
Recently i was given microarray data to analyze. The problem is whenever i
run MAS5 presence calls algorithm,
it throws an error saying NA/NaN/Inf in foreign function. How do i remove
such NA/NaN/Inf's ??
I tried na.omit(dataframe) but stil problem exists.
dimension of matrix (data) is 35556 7.
>