We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
For regular data sources, I can do the following to obtain a count as an atomic value:
> data_frame(1:3) %>% tally %>% as.numeric
For SQL sources, I have to insert a collect():
> memdb_frame(a=1:3) %>% tally %>% as.numeric
Error in magrittr(.) : (list) object cannot be coerced to type 'double'
2: magrittr(.) at pipe.R#6
1: memdb_frame(a = 1:3) %>% tally %>% as.numeric
> memdb_frame(a=1:3) %>% tally %>% collect %>% as.numeric
Perhaps we can implement as.numeric.tbl_lazy() and others?
The text was updated successfully, but these errors were encountered:
I think we should implement pull() from lplyr: https://github.com/paulponcet/lplyr. It could default to the first column.
Sorry, something went wrong.
What's special about the first column? Often you want to pull data after applying mutate(), which adds columns at the end.
The verb itself could also have more general mutate semantics: iris %>% pull(Sepal.Length * Sepal.Width) .
iris %>% pull(Sepal.Length * Sepal.Width)
It's just a reasonable default because you often have a single column data frame.
I think I like the idea of allowing it to do inline mutation too.
If the last column is the default, it will still work for one-column data frames.
Hmmmm, that just somehow feels less predictable to me. It probably doesn't really matter if we support inline mutate.
No branches or pull requests