Hi everyone,
I have a large data set with about 3'000 columns and I would like to exclude all columns which include three or more consecutive zeros (see below example). A further issue is that it should just jump NA values if any. How can I do this? In the below example R should exclude column C and D (since in D jumping the NA leaves three consecutive zeros). I would appreciate any solutions to this issue. Many thanks! S.B. Date A B C D 1980 2 75 12 41 1981 9 NA 7 0 1982 18 15 0 0 1983 0 16 0 NA 1984 12 43 0 0 1985 48 3 26 21 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.