Skip to content
Back to formatted view

Raw Message

Message-ID: <CAM9Qe4gqxF+k2qUDOpd-0e79GopDDs=g2S1syEhUa-piwQ2Hpg@mail.gmail.com>
Date: 2016-12-06T18:18:41Z
From: greg holly
Subject: CONFUSSING WITH select[!miss] <- 1:sum(!miss)

Dear All;

I am very new in R and try to understand the logic for a program has been
run sucessfully. Here select[!miss] <- 1:sum(!miss) par is confussing me. I
need to understandand the logic behind this commend line.

Thanks in advance for your help,

Greg


miss <- apply(is.na(ph[,c("M1","X1","X2","X3")]),1, any)
select <- integer(nrow(ph))
select[!miss] <- 1:sum(!miss)

	[[alternative HTML version deleted]]