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? Sign in to your account
%>%
$
MWE from ebits, both b$min and sum have one required and one named default argument.
ebits
b$min
sum
The first example that throws an error here should work. This might be an R bug though.
library(modules) b = import('base') c(1:100) %>% b$minN # Error in `c(1:100)`$b : 3 arguments passed to '$' which requires 2 c(1:100) %>% (b$minN) # [1] 2 c(1:100) %>% b$minN(N=2) # [1] 2 c(1:100) %>% sum # [1] 5050 c(1:100) %>% sum(na.rm=T) # [1] 5050
The text was updated successfully, but these errors were encountered:
This is a “bug” in magrittr, not modules. However, they would probably argue that it’s by design1. The “correct” way to make this work is:
c(1:100) %>% b$minN()
However, I think it might be worth reporting this anyway, and see whether the magrittr folks agree.
1 It’s required to make the syntax foo %>% .$something work.
foo %>% .$something
Sorry, something went wrong.
Yes, you are right.
I could also reproduce the example by putting a function in a list, without modules involvement.
No branches or pull requests
MWE from
ebits
, bothb$min
andsum
have one required and one named default argument.The first example that throws an error here should work. This might be an R bug though.
The text was updated successfully, but these errors were encountered: