Quantcast
Viewing all articles
Browse latest Browse all 4448

R 3.3.0; Missing values not recognized as NA during read.csv - Workaround

@sagard21 wrote:

Hello everyone. Thought of sharing the workaround taken for missing values not represented as NA.

I was trying to figure out the NA's in the dataset and post initial import I kept getting 0 TRUEs for is.na() and the dataset did have several missing values. Screenshot was also provided in the workshop tutorial. I realized that R did not convert the missing values to NA.

I found the following answer on stack overflow that helped me get the NAs:

test <- read.csv("test_2AFBew7.csv", header=T, na.strings=c(""))

Thought it might be helpful for someone who didnt know this.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles