Possible to send Python code to RStudio console from knitr chunk like normal R code? -


i use r , rstudio lot @ university homework assignments. assignments along lines of: "proof theorem xy , implement solution in r".

currently, rely on wolframalpha , maple symbolic computations, work in rstudio solve such problems.

i know r has interface sympy called rsympy , there computer algebra systems ryacas. however, since rstudio can execute python scripts if stored in .py file , send them rstudio console, wondering if somehow possible use python code within knitr chunks engine="python" , send script rstudio console without having knit entire document?

the workflow looking following:

  1. have .rmd file in rstudio chunk engine="python"
  2. import sympy , symbolic computations
  3. execute python chunk , see output in rstudio console (like 1 can normal r chunks) without knitting entire document
  4. ideally, possible access python results can convert them r formula etc.

see link screenshot: https://www.dropbox.com/s/hn8azii7cji4suz/stackexchange_question.tiff?dl=0

if know more elegant way symbolic computations in r+rstudio, looking forward answers!

thanks lot willing me:) has been bugging me quite time now...

my problem has been solved latest preview of rstudio server.

not can add python chunks , have output displayed in rstudio notebook, there options bash , sql too.

just wrote simple test procedure , works charm.

so problem solved.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -