[R] CONFUSSING WITH select[!miss] <- 1:sum(!miss)

greg holly mak.hholly at gmail.com
Tue Dec 6 19:18:41 CET 2016


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]]



More information about the R-help mailing list