Re: [R] Omitting NA's using dcast (reshape2 package)

2015-06-22 Thread David L Carlson
ect: [R] Omitting NA's using dcast (reshape2 package) I'm using the "dcast" function from Hadley's "reshape2" package to do some tabulations. I can't get it to exclude NA's in the variables being tabulated. Here's a simple example. v1 <- c(rep("

[R] Omitting NA's using dcast (reshape2 package)

2015-06-22 Thread Michael . Laviolette
I'm using the "dcast" function from Hadley's "reshape2" package to do some tabulations. I can't get it to exclude NA's in the variables being tabulated. Here's a simple example. v1 <- c(rep("A", 5), rep("B", 5), NA) v2 <- c("X", "Y", "Y", "Z", "Z", "X", "Y", "Y", "Z", NA, "Z") v3 <- c(rep("a", 4)