Skip to content
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

In Jupyter notebook, how to deal with the R function argument that contain special symbol? #424

Closed
zhanglab2008 opened this issue Jul 7, 2021 · 2 comments

Comments

@zhanglab2008
Copy link

zhanglab2008 commented Jul 7, 2021

Hi, great work!
I don't know how to escape the special character in the arguments when I used RCall in jupyter notebook. Here is an example:

@rimport Seurat as seu
seu.DimPlot(object=R"girlom", label=true, label.size=6)

In this example, label.size has a special symbol ".", which is allowed in R. When I run this in Julia, however, it gets me this error:

syntax: invalid keyword argument name "label.size" around In[19]:1

Stacktrace:
 [1] top-level scope
   @ In[19]:1
 [2] eval
   @ ./boot.jl:360 [inlined]
 [3] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
   @ Base ./loading.jl:1094

Do you have any ideas how to get around this?
Many thanks!!!

@randy3k
Copy link
Member

randy3k commented Jul 7, 2021

See bottom of the page https://juliainterop.github.io/RCall.jl/stable/gettingstarted/#@rlibrary-and-@rimport-macros-1

@zhanglab2008
Copy link
Author

Thank you so much!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants