Comments (3)
@cboettig nice idea!
The interesting thing about the workhorse function that roomba's wrapped around, dfs_idx
is that we can even include a call to filter based on some value, e.g. "givenName" == "Bob"
. Right now we just check whether there is any value at all with has_good_stuff()
inside roomba
.
For this v1 we decided not to allow the user to filter in the roomba()
call since we weren't sure how the syntax would work. Say you wanted "value" > 42 & "value" =< 100
. (What we could do is allow the user to pass a list of all the conditions that they want to be true and then string them together, separated by &
s if keep == all
and |
s if keep == any
before passing the conditions into a revamped has_good_stuff
.)
Renaming feels like a nice-to-have, but if we were to make the inputs to roomba()
allow for more complexity it feels like the a filter might be more useful than a rename.
Would love to hear what you think about allowing for filtering and concatenating the conditionals!
from roomba.
Very cool. Yeah, it makes total sense to keep the syntax simple even at the cost of features -- we already have a bunch of feature-rich queries like jq
that most of us find too complex for regular use.
So I agree that it doesn't make sense to start adding too many different optional arguments inside roomba()
function. I do wonder though if a dplyr
-esque pipeline syntax might be possible, e.g. a roomba() %>% filter() %>% rename()
kind of deal. (might need a lazy-eval strategy where the piped commands are stored and combined into a single operation around a dfs_idx
call?)
from roomba.
Ah that's a really cool idea! We could even store all the operations the user wants to do and then carry them out in something like
roomba_plan <-
roomba(cols = c(x, y z)) %>%
filter(x > 4) %>%
rename(a = x)
df %>% roomba_execute(roomba_plan)
I suppose it doesn't matter perfomance-wise whether the rename
happens in roomba_plan
or after roomba_execute()
but the filter I can see being useful to pass to dfs_idx
rather than doing it after.
from roomba.
Related Issues (20)
- Function to return non-null names
- Change replace_null to replace using the correct type of NA
- Doesn't work with mixed types HOT 3
- Reddit data not working
- Try to keep types as they are; if we can't map as.character over the entire input
- Allow user to pass bare column names
- Update the readme with any and all
- Throw error / warning if user supplies name which doesn't exist in the data
- Fix the recycling issue in replace_null()
- Export replace_null()
- make shiny app plot not hardwired
- When keep = any, keep rows that are completely null and assign them NA in all cols
- Allow selection of included R package datasets in Shiny app
- Working across different levels of nesting? HOT 7
- every time I read a Json I get internal error warning on R_decompress1 HOT 1
- Move hexsticker up to the level of the package name in README HOT 1
- Depending on roomba HOT 2
- error when installing roomba HOT 5
- Transfer to personal account HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roomba.