source(‘qserver.R’)<o:p></o:p>
<o:p> </o:p>
execute(h,“test:(sym:`$();time:"t"$())”)<o:p></o:p>
execute(h,“test insert (
BAC;"t"$1000)”)<o:p></o:p>
<o:p> </o:p>
You need to convert the time to millisecond using t.<o:p></o:p>
<o:p> </o:p>
Kim<o:p></o:p>
<o:p> </o:p>
Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Roni Hoffman
Gesendet: Montag, 4. Januar 2016 19:12
An: Kdb+ Personal Developers
Betreff: Re: [personal kdb+] Publishing data from R<o:p></o:p>
<o:p> </o:p>
Thanks Kuentang,<o:p></o:p>
<o:p> </o:p>
If I want to extend the api to insert a Time for example. I should create a function to convert a time to milliseconds correct?<o:p></o:p>
<o:p> </o:p>
but just trying this for example<o:p></o:p>
<o:p> </o:p>
execute(h,“test:(sym:`$();time:“T”$())”)<o:p></o:p>
<o:p> </o:p>
execute(h,“test insert (
BAC;"i"$1000)”)<o:p></o:p>
<o:p> </o:p>
I get a `type error on the insert.<o:p></o:p>
<o:p> </o:p>
am I doing this wrong?<o:p></o:p>
<o:p> </o:p>
On Monday, January 4, 2016 at 12:41:44 PM UTC-5, kuentang wrote:<o:p></o:p>
I guess you have checked this page already: http://code.kx.com/wiki/Cookbook/IntegratingWithR .<o:p></o:p>
<o:p></o:p>
And no you cannot natively publish data from r to kdb. You need to extend the api.<o:p></o:p>
<o:p></o:p>
Kim<o:p></o:p>
<o:p></o:p>
Von: personal…@googlegroups.com [mailto:personal…@googlegroups.com] Im Auftrag von Roni Hoffman
Gesendet: Montag, 4. Januar 2016 18:14
An: Kdb+ Personal Developers
Betreff: [personal kdb+] Publishing data from R<o:p></o:p>
<o:p></o:p>
Hello, I am fairly new to R and I would like to publish data into a qserver, wondering if anyone has experience doing this?<o:p></o:p>
<o:p></o:p>
I haven’t really found any examples anywhere.<o:p></o:p>
<o:p></o:p>
I have opened a connection but am not really sure how to publish the correct Q types as a data array.<o:p></o:p>
<o:p></o:p>
Thanks<o:p></o:p>
–
Submitted via Google Groups