similar to: Reading Inf and NaN values under windows (PR#1072)

Displaying 20 results from an estimated 30000 matches similar to: "Reading Inf and NaN values under windows (PR#1072)"

2005 Jul 06
1
Error message NA/NaN/Inf in foreign function call (arg 6) when using knn()
I am trying to use knn to do a nearest neighbor classification. I tried using my dataset and got an error message so I used a simple example to try and understand what I was doing wrong and got the same message. Here is what I typed into R: try [,1] [,2] [,3] [,4] r "A" "A" "T" "G" r "A" "A" "T" "G" f
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
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. >
2011 Dec 13
1
NA/NaN/Inf in foreign function call question
Dear all, I have a datafile where I run haplo.GLM analyses using several variables (a matrix). However, when I include a certain binary variable (0,1) I get this message Error: NA/NaN/Inf in foreign function call (arg 4) I don't get an error when I include another binary variable, again with only 0,1. Both variables don't have missing values, they only have 0 and 1. Why do I get an
1998 Jul 22
1
R-beta: NaN & Inf
Can someone explain what this words (NaN and Inf) mean ? I get then as a result of some matrix operations, in the end I have a matrix without any figures just this words. regards ernesto ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing
2008 Oct 25
1
0 ^ NaN == Inf, why?
In R, 0 ^ NaN yields Inf. I would have expected NaN or perhaps 0. Is this behaviour intended? >sessionInfo() R version 2.8.0 (2008-10-20) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils
2010 May 13
1
results of pnorm as either NaN or Inf
I stumbled across this and I am wondering if this is unexpected behavior or if I am missing something. > pnorm(-1.0e+307, log.p=TRUE) [1] -Inf > pnorm(-1.0e+308, log.p=TRUE) [1] NaN Warning message: In pnorm(q, mean, sd, lower.tail, log.p) : NaNs produced > pnorm(-1.0e+309, log.p=TRUE) [1] -Inf I don't know C and am not that skilled with R, so it would be hard for me to look into
2006 Jul 14
1
dweibull retuns NaN instead of Inf (PR#9080)
Full_Name: G?ran Brostr?m Version: 2.3.1 OS: Linux, ubuntu Submission from: (NULL) (85.11.40.53) > dweibull(0, 0.5, 1) [1] NaN Warning message: NaNs produced in: dweibull(x, shape, scale, log) should give Inf (and no Warning). Compare with > dgamma(0, 0.5, 1) [1] Inf This happens when 'shape' < 1.
2011 Feb 14
1
Error en lm.fit NA/NaN/Inf en llamada a una función externa
Hello, I am new with R, and I'm trying to fit a linear model, I did the following and obtein this result, can anybody help? Thanks, > logdftodos7925vi <- log(dftodos7925vi) > logALTURA7925<- log(dftodos7925$ALTURA7917) > logtodos7925.lm <- lm (logALTURA7925~., data= logdftodos7925vi) Error en lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/NaN/Inf en
2011 Dec 15
2
Random Forest Reading N/A's, I don't see them
After checking the original data in Excel for blanks and running Summary(cm3) to identify any null values in my data, I'm unable to identify an instances. Yet when I attempted to use the data in Random Forest, I get the following error. Is there something that Random Forest is reading as null which is not actually null? Is there a better way to check for this? > library(randomForest) >
2005 Sep 26
2
nls and na/Nan/Inf error
I am trying to it a particular nonlinear model common in Soil Science to moisture release data from soil. I have written the function as shown below according to the logist example in Ch8 of Pinheiro & Bates. I am getting the following error (R version 2.1.1) *Error in qr(attr(rhs, "gradient")) : NA/NaN/Inf in foreign function call (arg 1)* Below is the function and data. /#
2015 Nov 30
1
Inconsistency in treating NaN-results?
As a side note, Splus makes sin(x) NA, with a warning, for abs(x)>1.6*2^48 (about 4.51e+14) because more than half the digits are incorrect in sin(x) for such x. E.g., in R we get: > options(digits=16) > library(Rmpfr) > sin(4.6e14) [1] -0.792253849684354 > sin(mpfr(4.6e14, precBits=500)) 1 'mpfr' number of precision 500 bits [1]
2015 Nov 26
2
Inconsistency in treating NaN-results?
This question is more out of curiosity than a complaint or suggestion, but I'm just wondering. The behavior of R on calculations that result in NaN seems a bit inconsistent. # this is expected: > 0/0 [1] NaN # but this gives a warning > sin(Inf) [1] NaN Warning message: In sin(Inf) : NaNs produced # and this again does not > exp(NaN) [1] NaN Conceptually, I like to think that R
2004 Aug 26
1
EM norm package (NA/NaN/Inf in foreign function call (arg 2))
Greetings! I am bootstrapping and I am using EM in the norm package to fill in missing data for a financial time series with each step of the loop. For the most part EM works fine for me, but the following error message is guaranteed before I hit the 200th scenario: Iterations of EM: 1...2...3........348...349...Error: NA/NaN/Inf in foreign function call (arg 2) The following code should
2002 Jun 14
1
Error: NA/NaN/Inf in foreign function call (arg 1)
Hi, I have a huge data table with several variables containing missing values. I want to make a simple scatter plot (Mass, HSI) and draw a smooth regression on it. Here are the summaries of these two variables: > summary(Mass) Min. 1st Qu. Median Mean 3rd Qu. Max. 46.0 205.9 272.5 282.6 348.3 610.1 > summary(HSI) Min. 1st Qu. Median Mean 3rd Qu. Max.
2003 Oct 02
4
using a string as the formula in rlm
Hi, I am trying to build a series of rlm models. I have my data frame and the models will be built using various coulmns of the data frame. Thus a series of models would be m1 <- rlm(V1 ~ V2 + V3 + V4, data) m2 <- rlm(V1 ~ V2 + V5 + V7, data) m3 <- rlm(V1 ~ V2 + V8 + V9, data) I would like to automate this. Is it possible to use a string in place of the formula? I tried doing: fmla
2006 Jan 13
1
glmmPQL: Na/NaN/Inf in foreign function call
I'm using glmmPQL, and I still have a few problems with it. In addition to the issue reported earlier, I'm getting the following error and I was wondering if there's something I can do about it. Error in logLik.reStruct(object, conLin) : Na/NaN/Inf in foreign function call (arg 3) ... Warnings: 1: Singular precistion matrix in level -1, block 4 (...) 4: "" The
2001 Sep 28
1
binary coding of NA, Nan etc.
I wonder which binary codings to use for the different "special" values used in R. I want to create binary coded files of double, int, and string values that should get read into R using readBin. Now, what is the correct way to code NA, NaN, Inf, and -Inf for these types? The documentation for read/writeBin doesnt contain any info on that ... (for int and string, there probably is only
2013 Feb 13
2
NA/NaN/Inf in foreign function call (arg 6) error from coxph function
Dear R-helpers: I am trying to fit a multivariate Cox proportional hazards model, modelling survival outcome as a function of treatment and receptor status. The data look like below: # structure of the data str(sample.data) List of 4 $ survobj : Surv [1:129, 1:2] 0.8925+ 1.8836+ 2.1191+ 5.3744+ 1.6099+ 5.2567 0.2081+ 0.2108+ 0.2683+ 0.4873+ ... ..- attr(*, "dimnames")=List of 2