2016-08-05 47 views

回答

0

是,na.strings可以擁有多個值在read.csv /函數read.table。

Ex: 
    dsa <- read.table("C://Users/....../dsa.txt",sep=",",header=T) 
    ID Name Date 
1 1 AA 2011 
2 2 BB 2012 
3 3 CC 2013 

    dsa <- read.table("C://Users/....../dsa.txt",sep=",",header=T,na.strings = c("AA","2")) 
ID Name Date 
1 1 <NA> 2011 
2 NA BB 2012 
3 3 CC 2013 
相關問題