Comments (4)
I believe there is no problem of using $
. With this macro,
macro s_mstr(x)
quote
rprint($x)
end
end
there is no problem in extracting the list element by using $
:
julia> s"""
x = list(a=1,b=2)
y = x$a
"""
[1] 1
PS: unfortunately, r_mstr
is used, so we have to think of something different. I vote for s_mstr
.
from rcall.jl.
Sorry, what I meant was that it might be difficult to use $
the same way the proposed mat_str
macro does, i.e. for copying the corresponding julia variable to R.
from rcall.jl.
You could allow only $
followed by parens, e.g. $(a)
, unless that's actually valid R syntax in some context. I believe you could backslash-escape other cases of $
before passing to the parser. Alternatively, it may be that valid uses of $
for interpolation are never valid R syntax, so there would be no ambiguity. (I don't know R well enough to say if this is the case.)
The hardest part in JuliaInterop/MATLAB.jl#29 was determining whether a variable/expression is assigned or used. This is easier for MATLAB than other languages because the MATLAB parser sucks and can't itself handle cases that would be hard for us to handle, but it still turned out to be non-trivial. However, if you can actually get the AST from R, this might not be too hard.
from rcall.jl.
This can also be closed by #94.
from rcall.jl.
Related Issues (20)
- 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
- ERROR: REvalError: Loading required package: mvtnorm HOT 1
- Difficulty installing RCall on a low version of julia HOT 6
- Incorrect julia compat HOT 3
- Add support for TimeZones
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.