Displaying 1 result from an estimated 1 matches for "lilloss".
Did you mean:
libgloss
2011 Sep 02
2
If NA Problem!
...n for
my project. The thing I most want to understand is how, after specifying a
certain condition, one may save certain data that occurs when that condition
is met. I hope I have been clear enough!
Thank you very much for your help!
Anna
biglist<-list(a=1:4,b=2:6)
lilwin<-list(x=NA,y=2)
lilloss<-list(m=1,n=3)
> biglist$a
[1] 1 2 3 4
$b
[1] 2 3 4 5 6
> lilwin$x
[1] NA
$y
[1] 2
> lilloss$m
[1] 1
$n
[1] 3
iwish<-list()
for(p in 1:length(biglist)){
if(is.na(lilwin[[p]])==F) iwish[p]<-list(biglist[[p]][lilwin[[p]]])
}
> iwish[[1]]
NULL
[[2]]
[1] 3
[[alternativ...