[R] some question about vector[-NULL]

PO SU rhelpmaillist at 163.com
Wed Sep 10 09:21:12 CEST 2014


Dear expeRts,
      I have some programming questions about NULL in R.There are listed as follows:
1. I find i can't let a list have a element NULL:
a<-list()
a$ress<-1
a$res<-NULL
a
str(a)

How can i know i have a named element but it is NULL, not just get a$xxxx,a$iiii,a$oooo there all get NULL
2.The most important thing:
a<-1:10
b<-NULL or 1
a<-c(a,b) will work so i don't need to know whether b is null or not,but:
a[-NULL] can't work!!  i just need a[-NULL]==a , how can i reach this purpose?




     
    





--

PO SU
mail: desolator88 at 163.com 
Majored in Statistics from SJTU


More information about the R-help mailing list