I use R and RStudio a lot at university for homework assignments. The assignments are usually along the lines of: "Proof theorem xy and implement your solution in R".
Currently, I mainly rely on Wolframalpha and Maple for symbolic computations, but I would like to work completely in RStudio to solve such problems.
I know that R has an interface to Sympy called rSympy and that there are computer algebra systems like RYacas. However, since RStudio can execute Python scripts if they are stored in a .Py file and send them to the RStudio console, I was wondering if it is somehow possible to use Python code within knitr chunks with engine="python" and send the script to the RStudio console without having to knit the entire document?
The workflow I am looking for is the following:
See this link for a screenshot: https://www.dropbox.com/s/hn8azii7cji4suz/stackexchange_question.tiff?dl=0
If you know a more elegant way to do symbolic computations in R+RStudio, I am also looking forward to your answers!
Thanks a lot to everyone who is willing to help me:) This has been bugging me for quite some time now...
My problem has been solved with the latest preview of RStudio Server.
Not only can you add Python chunks and have the output immediately displayed in the RStudio notebook, but there are options for bash and SQL too.
Just wrote a simple test procedure and it works like a charm.
So problem solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With