Comments (9)
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.
from rcall.jl.
actually the separator is only required for definitions, you don't need it for calling
from rcall.jl.
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 draw.segments
. Julia seems to be having trouble passing it along to R. In Julia, I have never come across keyword arguments with attributes as in R.
from rcall.jl.
@mbeltagy I don't yet have a good way to handle that case.
from rcall.jl.
It is one of the ways to mimic this, certainly not a good way.
eval(:(rcall(:stars,:mtcars,$(symbol("draw.symbol"))=true)))
It may be also of interest to implement a @rcall
macro to handle non-standard keywords and lazy evaluation #42.
from rcall.jl.
It works!
eval(:(rcall(:stars,:mtcars,$(symbol("draw.segments"))=true)))
The syntax is a bit cumbersome though. I look forward to an @rcall
macro.
from rcall.jl.
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))
from rcall.jl.
I would be okay with incorporating something along these lines. Any suggestions for a good prefix? r
, s
, and v
are all taken by various uses in Base (which, unfortunately, are the 3 most relevant in this case).
from rcall.jl.
I've added the above macro, so hopefully that is a reasonable solution.
from rcall.jl.
Related Issues (20)
- Juliahub docs are dead? HOT 2
- Allow usage of Preferences.jl to configure R_HOME HOT 2
- Error happens when you try to execute command ENV["R_HOME"] HOT 4
- libR.so in nonstandard location HOT 3
- why building RCall.jl failed during the registration of an package HOT 2
- RCall.jl failed to build with Conda (23.3.1) HOT 3
- "is.na() applied to non-(list or vector) of type 'language'" when passing a Julia's boolean variable to R's smooth.spline HOT 2
- Unable to Pkg.build RCall HOT 4
- Find the number of arguments for an RFunction? HOT 1
- loading RCall in atreplinit fails because of RPrompt HOT 1
- Error: attempt to apply non-function HOT 5
- [BUG] ArgumentError: malformed expression in formula HOT 3
- If julia functions which was brought to R throws an error, no real error is thrown, but an error object is returned #216 HOT 3
- Feature Request: Add possibility to build RCall without having R_HOME set HOT 3
- ERROR: UndefVarError: `val` not defined
- Segmentation fault on closing julia HOT 7
- equal `==` is not working on `reval` HOT 2
- Feature Request: Make RCall depend dynamically on `R_HOME` HOT 9
- Feature Request: show/display methods for R plots like ggplot2 HOT 3
- Could we add a point in the docs about setting up CI ? HOT 6
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 rcall.jl.