Top "Na" questions

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

Replace NA with 0 in a data frame column

Possible Duplicate: Set NA to 0 in R I have a data.frame with a column having NA values. I want …

r dataframe na
How to replace NA values in a table for selected columns

There are a lot of posts about replacing NA values. I am aware that one could replace NAs in the …

r replace dataframe data.table na
How to delete columns that contain ONLY NAs?

I have a data.frame containing some columns with all NA values, how can I delete them from the data.…

r dataframe na
Setting <NA> to blank

I have a dataframe with an NA row: df = data.frame(c("classA", NA, "classB"), t(data.frame(rep("A", 5), …

r na
Replacing character values with NA in a data frame

I have a data frame containing (in random places) a character value (say "foo") that I want to replace with …

r dataframe na
aggregate methods treat missing values (NA) differently

Here's a simple data frame with a missing value: M = data.frame( Name = c('name', 'name'), Col1 = c(NA, 1) , Col2 = …

r aggregate na
Dealing with missing values for correlations calculation

I have huge matrix with a lot of missing values. I want to get the correlation between variables. 1. Is the …

r correlation na missing-data
Fastest way to detect if vector has at least 1 NA?

What is the fastest way to detect if a vector has at least 1 NA in R? I've been using: sum( …

r na
Test for NA and select values based on result

My question is rather simple. What I want is if A[i]!=NA, then C[i]=A[i], if A[…

r if-statement na
Remove NA/NaN/Inf in a matrix

I want to try two things : How do I remove rows that contain NA/NaN/Inf How do I set …

r matrix rows na