Skip to content
Prev 293229 / 398503 Next

Data frame vs matrix quirk: Hinky error message?

Bert,

I think this is what is needed for the data frame

ix <- cbind(1:2,2:3)
ixm <- matrix(FALSE,4,3)
ixm[ix] <- TRUE
zdf[ixm] <- NA

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