-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
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
Calling R functions with keyword argumets that have attributes #71
Comments
I don't think the example is reproducible so I will ask you to try rprint(rcall(:stars,myDF;draw.segments=true)) to see if that works. In Julia named arguments are allowed only after the ; separator. |
actually the separator is only required for definitions, you don't need it for calling |
I tried it and it did not work. I got the same error rprint(rcall(:stars,myDf;draw.segments=true))
ERROR: syntax: keyword argument is not a symbol: "draw.segments" The trouble appears to be with |
@mbeltagy I don't yet have a good way to handle that case. |
It is one of the ways to mimic this, certainly not a good way.
It may be also of interest to implement a |
It works! eval(:(rcall(:stars,:mtcars,$(symbol("draw.segments"))=true))) The syntax is a bit cumbersome though. I look forward to an |
A neat hack I once came across somewhere (I don't remember where). Define the following: macro var_str(s)
symbol(s)
end then the following should work: rprint(rcall(:stars,myDF;var"draw.segments"=true)) |
I would be okay with incorporating something along these lines. Any suggestions for a good prefix? |
I've added the above macro, so hopefully that is a reasonable solution. |
If I was to call R's stars function. It is easy to invoke it with
However if I try to set the
draw.segments=TRUE
as I would inR
. The following invocation failsI saw nothing in the documentation to clarify how this might be handled.
The text was updated successfully, but these errors were encountered: