Top "Na" questions

NA is a missing value indicator (Not Available) in the R language.

mean( ,na.rm=TRUE) still returns NA

I'm very new to R (moving over from SPSS). I'm using RStudio on a Mac running Mavericks. Please answer my …

r mean na
How to replace NA with mean by group / subset?

I have a dataframe with the lengths and widths of various arthropods from the guts of salamanders. Because some guts …

r subset na
What does is.na() applied to non-(list or vector) of type 'NULL' mean?

I want to select a Cox model with the forward procedure from a data.frame with no NA. Here is …

r na cox-regression
How to replace empty string with NA in R dataframe?

My first approach was to use na.strings="" when I read the data in from a csv. This doesn't work …

r dplyr na
dplyr join define NA values

Can I define a "fill" value for NA in dplyr join? For example in the join define that all NA …

r left-join dplyr na
R error in glmnet: NA/NaN/Inf in foreign function call

I am trying to create a model using glmnet, (currently using cv to find the lambda value) and I am …

r sparse-matrix na glmnet
Merging data - Error in fix.by(by.x, x)

I am trying to merge data in R as suggested in an answer to my other post here. Yet, I …

r merge na zoo data-files
logical(0) in if statement

This line: which(!is.na(c(NA,NA,NA))) == 0 produces logical(0) While this line if(which(!is.na(c(NA,…

r if-statement na
How to Replace Raster Values Less than 0 to NA in R code

I am working with Landsat imagery to calculate net radiation. There are very low negative values (ex: -0.000003) that are …

r raster na
Summing lots of Vectors; row-wise or elementwise, but ignoring NA values

I am trying to create a new vector that is the sum of 35 other vectors. The problem is that there …

r vector sum na