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:
- have .rmd file in rstudio chunk engine="python"
- import sympy , symbolic computations
- execute python chunk , see output in rstudio console (like 1 can normal r chunks) without knitting entire document
- 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
Post a Comment