> Does anyone have any experience writing interacts for R? If so, can you
> post or send examples?
>
Hi Tom!
In principle, one could write interacts using R. You would just do
@interact
def _(n=(5,[3..10])):
L = [1..n]
a = r(L)
print r.median(a)
http://sagecell.sagemath.org/?q=lgozep
However, I don't know that this is the way I would go about it. (I think I
know your use case, in which case maybe you will just have to use Sage
cells using R.) The "right" way would be to use RStudio and its manipulate
functionality.
https://support.rstudio.com/hc/en-us/articles/200551906-Interactive-Plotting-with-Manipulate
Shiny is a very nice interface they use and deploy for a lot of customers,
I believe (all OSS, though, as far as I know):
http://shiny.rstudio.com/gallery/movie-explorer.html
You can embed them.
https://www.rstudio.com/faq-items/can-i-embed-shiny-apps-in-other-websites-e-g-iframes/
However, I don't see an obvious way to get this to interact easily with the
Sage cell framework, it's completely separate. @interact is only available
for Sage itself. (Cc:ing Rob B in case he has an idea for how this could
fit into MBX.)
K-D
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.