I have the following df where df <- data.frame(V1=c(0,0,1),V2=c(0,0,2),V3=c(-2,0,2))
If I do filter(df,rowSums!=0) I get the following error: Error in filter_impl(.data, quo) : Evaluation error: comparison (6) is possible only for atomic and list types.
Does anybody know why is that? Thanks for your help
PS: Plain rowSums(df)!=0 works just fine and gives me the expected logical
rowSums()
, to a numeric,0
. As the error message says, comparison is only possible for atomic and list types. 2. Thedplyr::filter
function is designed to take column names as the 2nd argument. - Curt F.