My data is like this:
X1e X2e X3e X4e
360 0 0 0
360 0 0 0
260 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
90 0 0 0
360 0 360 0
360 0 360 260
I want to remove the X1e X4e columns between 0 and 270, did not remove 0 row
for (i in c(1,4)){
e <- assign(paste("X",i, "e",sep = ""),i)
dat <- dat[with(dat, !((e>0)&(e<270))), ]
}
This removes all my dat and my dat became empty. Where is my problem?