[R] dplyr complete.cases(.) works one way but not another
Dimitri Liakhovitski
dimitri.liakhovitski at gmail.com
Wed Sep 30 16:04:25 CEST 2015
Hello!
I don't have a data set, but my question is very clear without it.
I have a data frame 'mydata' and want to reproduce in dplyr the
following R base command:
mydata[complete.cases(mydata), ]
This dplyr command produces the expected result:
library(dplyr)
mydata %>% filter(complete.cases(.))
But this command doesn't work:
filter(mydata, complete.cases(.))
Error: object '.' not found
Why doesn't it work?
Thank you!
--
Dimitri Liakhovitski
More information about the R-help
mailing list