Re: [NTG-context] Can anyone connect context to R or python?

2018-10-08 Thread Alan Braslau
On Mon, 8 Oct 2018 15:58:25 -0300 Stanislav Sokolenko wrote: > I have recently come across the SciLua project > (http://scilua.org/index.html) which has a built-in LuaJIT client for > Rserve (http://scilua.org/rclient.html) and may be relevant to the > discussion. Although it certainly isn't

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-08 Thread Stanislav Sokolenko
On 2018-10-06 02:06 PM, Aditya Mahajan wrote: I also want to take this opportunity to express my views on intefacing with external programs. The file based interaction provided by the filter module is okay for small projects but it is not ideal. Slightly better is to use pipes (popen to a

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-06 Thread Hans Hagen
On 10/6/2018 10:19 PM, Aditya Mahajan wrote: Now, what I want to do (at some stage) is to extend the functionality of the filter module to call jupyter kernels. So, instead of passing messages between context and the external program through text files, the messages can be passed as JSON

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-06 Thread Aditya Mahajan
On Sat, 6 Oct 2018, Alan Braslau wrote: On Sat, 6 Oct 2018 13:06:18 -0400 (EDT) Aditya Mahajan wrote: In my opinion, a better long-term option is to write a jupyter client in lua that can be called by context. Then we can easily interface with all languages that provide a jupyter kernel

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-06 Thread Alan Braslau
On Sat, 6 Oct 2018 13:06:18 -0400 (EDT) Aditya Mahajan wrote: > In my opinion, a better long-term option is to write a jupyter client in > lua that can be called by context. Then we can easily interface with all > languages that provide a jupyter kernel >

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-06 Thread Wolfgang Schuster
Aditya Mahajan schrieb am 06.10.18 um 19:06: The interface of a jupter-client is available here https://jupyter-client.readthedocs.io/en/stable/index.html. It seems relatively straight forward (send a JSON message and receive a JSON message). Translating the JSON messages to ConTeXt should

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-06 Thread Kelley, Claire
I also just got an incredibly helpful answer over on stack overflow : https://tex.stackexchange.com/questions/453868/how-can-i-use-context-and-r-together Which shows how to use Lua and filter together Claire On 10/6/18, 1:06 PM, "ntg-context on behalf of Aditya Mahajan" wrote: >On Sat, 6

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-06 Thread Aditya Mahajan
On Sat, 6 Oct 2018, Kelley, Claire wrote: Again thank you everyone for their incredibly helpful advice and responsiveness! The work flow I am envisioning is: 1) Use R to read in a csv file, filter according to some rules and then use propensity score matching (based on r packages) to create

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-06 Thread Kelley, Claire
Again thank you everyone for their incredibly helpful advice and responsiveness! The work flow I am envisioning is: 1) Use R to read in a csv file, filter according to some rules and then use propensity score matching (based on r packages) to create a model. 2) The final data output is a

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-05 Thread Alan Braslau
On Fri, 5 Oct 2018 20:07:27 +0200 Hans Hagen wrote: > > I want to fill it in with numbers that r reads from a csv file and > > processes. > Can you give an example? Do you only need R for reading the csv? The processing is done by R. Of course, it *could* be done in Lua, but this all

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-05 Thread Hans Hagen
On 10/5/2018 8:00 PM, Kelley, Claire wrote: Thank you for all the answers so far ! Ive gathered from that I need to use filter to call R externally. What I am still most interested in is how I could get a single value from R to be part of the Context code. (Like you would do with \Sexpr{}

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-05 Thread Kelley, Claire
Thank you for all the answers so far ! Ive gathered from that I need to use filter to call R externally. What I am still most interested in is how I could get a single value from R to be part of the Context code. (Like you would do with \Sexpr{} in sweave. The use case for this is that I

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-05 Thread Pablo Rodriguez
On 10/5/18 4:55 PM, Kelley, Claire wrote: > Hi All,  > I am very interested in creating pdf documents using Context with > calculations done in R or Python and then added into the document.  Hi Claire, ConTeXt MkIV comes with Lua inside. Would Lua fit your purposes? > If you were using

Re: [NTG-context] Can anyone connect context to R or python?

2018-10-05 Thread Henning Hraban Ramm
Am 2018-10-05 um 16:55 schrieb Kelley, Claire : > Hi All, > I am very interested in creating pdf documents using Context with > calculations done in R or Python and then added into the document. > > If you were using traditional latex this could be accomplished through R > markdown or

[NTG-context] Can anyone connect context to R or python?

2018-10-05 Thread Kelley, Claire
Hi All, I am very interested in creating pdf documents using Context with calculations done in R or Python and then added into the document. If you were using traditional latex this could be accomplished through R markdown or Sweave- is there any way to connect these to Context? Best, Claire