[R] Dinamic variables in loop

Laura Ringienė l@ur@ringiene @ending from gm@il@com
Tue May 8 13:57:39 CEST 2018


Hello,

I am a newbie in R and I have a problem.
I want this line:

newMyData <-MyData[!(is.na(col1)) | !(is.na(col2)) | !(is.na(col3)) | !(
is.na(col4)) | !(is.na(col5)),]

write in for loop. The number of col[number] may be different from 3 to 8

Is there any ideas?

Thank you
Laura

	[[alternative HTML version deleted]]



More information about the R-help mailing list