+ 9
Has anybody found a good way to run r on / or integrate with python on SoloLearn? Tried import rpy & rpy2 both with pip install.
I was going to run some programs from another website as an exercise using r but after researching several threads and reviewing the r intro courses I found nothing other than using another online compiler. Also saw several threads requesting SoloLearn to create an actual r tutorial. Even several former mods and platinum mods were represented in discussions related to r language on SoloLearn. btw I also tried using cpp #include <Rcpp.h> library but it too doesn't seem to work on SoloLearn
8 Respuestas
+ 5
Does this help? Might not be exactly what you're looking for but at least you can run R code.
https://code.sololearn.com/Ww11AZ761LLZ/?ref=app
edit: here is my current progress on the using rextester API to write the code in the html page. Need to process the returned JSON data (currently is alerted in .done()) and output it. Feel free to take it from here if you'd like.
https://code.sololearn.com/W09e6ho39jOf/?ref=app
+ 4
ChaoticDawg it appears that a solo-lution was discovered ... Yeah and a new error begins as r is here
https://code.sololearn.com/cLNAwVUU1dno/?ref=app
+ 3
I guess my current option is to send an email to SoloLearn and wait and see. Afterall , that's what we, as in the community, tell others whom suggest SoloLearn add a language.
much appreciated ChaoticDawg 👍feel free to do the same.
+ 2
ChaoticDawg that unfortunately is the off SoloLearn way and iframing back which is not what I wanted to do...
Thanks for responding.
+ 2
BroFar Ya, I kinda figured that it wasn't what you wanted, but thought I'd point out the option anyhow. It would be nice if they added it though!
+ 1
BroFar Yay! and Go too! I saw that and was looking for this post to tell you, but got side tracked.
0
Install rpy2 using pip install rpy2.
In your Python code, import rpy2 using import rpy2.robjects as robjects.
Use the robjects module to call R functions from Python.
0
install.packages("reticulate")
Once you have installed the package, you can use the py_run_string() function to run Python code from within R, and the r_to_py() function to convert R objects to Python objects. You can also use the import() function to import Python modules into R.