Skip to content
Prev 175933 / 398503 Next

Deleting rows based on identity variable

The problem is rules of precedence for evaluation.  Try

d2<-d1[!(id %in% c(1,4)), ]

Hope this is helpful,

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA  98504-5204