Repository navigation
Replies: 1 comment
|
Hi @fjuniorr, thanks for the suggestion! The switch was initially suggested by my colleague @damianooldoni when thinking about write functions. He found read resource name (1) from package (2) a more natural way of expressing the arguments. I concurred that having e.g. the dataframe first would work well with piping. However, you make a good case for piping with Some, in addition to: read_package() %>% read_resource("resource-name")The following scenario will also supported if we make create_package() %>%
add_resource(df1) %>% # function to be developed
add_resource(df2) %>%
write_package("directory")So, I'll revert the switch and make
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I've noted that the order of the arguments have changed in
read_resourcefrom(package, resource_name)to(resource_name, package)in ba943b1.One of the advantages of the previous ordering is that we could write code with both base (
|>) and magrittr (%>%) pipes in the following style:With the new order, with magrittr pipes we can still use
.as placeholderbut with the base pipe operator I need
I couldn't find the reasoning behind the change, but wanted to chime in in the discussion for the design of
frictionless-r.All reactions