+ 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

2nd Feb 2021, 11:17 PM
BroFar
BroFar - avatar
8 Respostas
+ 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
3rd Feb 2021, 6:33 AM
ChaoticDawg
ChaoticDawg - avatar
+ 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
13th Apr 2021, 12:42 AM
BroFar
BroFar - avatar
+ 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.
27th Feb 2021, 5:49 AM
BroFar
BroFar - avatar
+ 2
ChaoticDawg that unfortunately is the off SoloLearn way and iframing back which is not what I wanted to do... Thanks for responding.
27th Feb 2021, 5:38 AM
BroFar
BroFar - avatar
+ 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!
27th Feb 2021, 5:41 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
BroFar Yay! and Go too! I saw that and was looking for this post to tell you, but got side tracked.
13th Apr 2021, 12:57 AM
ChaoticDawg
ChaoticDawg - avatar
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.
22nd Apr 2023, 7:46 AM
Ali Akram Marufi
Ali Akram Marufi - avatar
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.
25th Apr 2023, 7:30 AM
Ali Akram Marufi
Ali Akram Marufi - avatar