# rserver for q

**URL:** <https://forum.kx.com/t/rserver-for-q/8522>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [November 27, 2013, 2:59pm UTC](https://forum.kx.com/t/rserver-for-q/8522 "2013-11-27T14:59:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveen\_sharma](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@naveen\_sharma](https://forum.kx.com/u/naveen_sharma)\
**Post date:** [November 27, 2013, 2:59pm UTC](https://forum.kx.com/t/rserver-for-q/8522/1 "2013-11-27T14:59:00Z")

</div>

Does the interface not work for trial edition? I am working on a 64 bit linux machine with the trial version.  
I change the makefile 2nd line to Q=~/q/l32. It compiled and moved rserver.so to the l32 dir.

When i ran the command&nbsp;Ropen:`rserver 2:(`ropen;1), it gave an error saying&nbsp;wrong ELF class: ELFCLASS64.

I can see that there is one more instance where i need to change the $(MS) to l32 but doing so results in compilation errors.

Regards, &nbsp;

---

<div class="post-metadata">

**Author:** ![kuentang](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kuentang](https://forum.kx.com/u/kuentang)\
**Post date:** [November 27, 2013, 3:27pm UTC](https://forum.kx.com/t/rserver-for-q/8522/2 "2013-11-27T15:27:00Z")

</div>

\<o:p\> \</o:p\>

Sorry, cannot help since I am on w32. But I can report that it works on w32 and trial version. \<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) [[mailto:personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)] **Im Auftrag von** naveen sharma  
**Gesendet:** Mittwoch, 27. November 2013 16:00  
**An:** [personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)  
**Betreff:** [personal kdb+] rserver for q\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

Does the interface not work for trial edition? I am working on a 64 bit linux machine with the trial version.\<o:p\>\</o:p\>

I change the makefile 2nd line to Q=~/q/l32. It compiled and moved rserver.so to the l32 dir.\<o:p\>\</o:p\>

When i ran the command&nbsp;Ropen:`rserver 2:(`ropen;1), it gave an error saying&nbsp;wrong ELF class: ELFCLASS64.\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

I can see that there is one more instance where i need to change the $(MS) to l32 but doing so results in compilation errors.\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

\<o:p\> \</o:p\>

Regards, &nbsp;\<o:p\>\</o:p\>

–  
Submitted via Google Groups

---

<div class="post-metadata">

**Author:** ![charlie1](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@charlie1](https://forum.kx.com/u/charlie1)\
**Post date:** [November 27, 2013, 4:33pm UTC](https://forum.kx.com/t/rserver-for-q/8522/3 "2013-11-27T16:33:00Z")

</div>

can you use the pre-built binary at&nbsp;http://code.kx.com/wsvn/code/cookbook\_code/r/rserve/bin/l32/rserve.so

?

---

<div class="post-metadata">

**Author:** ![naveen\_sharma](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@naveen\_sharma](https://forum.kx.com/u/naveen_sharma)\
**Post date:** [November 28, 2013, 4:58am UTC](https://forum.kx.com/t/rserver-for-q/8522/4 "2013-11-28T04:58:00Z")

</div>

The pre-built binary works fine. Thanks!

---

<div class="post-metadata">

**Author:** ![naveen\_sharma](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@naveen\_sharma](https://forum.kx.com/u/naveen_sharma)\
**Post date:** [November 29, 2013, 6:35am UTC](https://forum.kx.com/t/rserver-for-q/8522/5 "2013-11-29T06:35:00Z")

</div>

Is there a way I can make functions declared in R work with Rserve? i.e an equivalent of source(‘filename’) in rserve?

---

<div class="post-metadata">

**Author:** ![Chris\_Burke1](https://avatars.discourse-cdn.com/v4/letter/c/e9bcb4/32.png) [@Chris\_Burke1](https://forum.kx.com/u/Chris_Burke1)\
**Post date:** [November 29, 2013, 8:05am UTC](https://forum.kx.com/t/rserver-for-q/8522/6 "2013-11-29T08:05:00Z")

</div>

You should be able to do source(“filename”) in rserve. What do you get when you try this? You may need “fileio enable” but this is the default.

Chris

---

<div class="post-metadata">

**Author:** ![naveen\_sharma](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@naveen\_sharma](https://forum.kx.com/u/naveen_sharma)\
**Post date:** [November 29, 2013, 9:05am UTC](https://forum.kx.com/t/rserver-for-q/8522/7 "2013-11-29T09:05:00Z")

</div>

I tried Rcmd “source(‘file.R’)” but it doesn’t load the functions. When I do Rget “ls()”, the functions are not listed.

---

<div class="post-metadata">

**Author:** ![kuentang](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kuentang](https://forum.kx.com/u/kuentang)\
**Post date:** [November 29, 2013, 9:10am UTC](https://forum.kx.com/t/rserver-for-q/8522/8 "2013-11-29T09:10:00Z")

</div>

Try

Print(ls())

Von meinem iPhone gesendet

Am 29.11.2013 um 10:05 schrieb naveen sharma \<sharma.naveen888@gmail.com\>:

> I tried Rcmd “source(‘file.R’)” but it doesn’t load the functions. When I do Rget “ls()”, the functions are not listed.

---

<div class="post-metadata">

**Author:** ![naveen\_sharma](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@naveen\_sharma](https://forum.kx.com/u/naveen_sharma)\
**Post date:** [November 29, 2013, 9:13am UTC](https://forum.kx.com/t/rserver-for-q/8522/9 "2013-11-29T09:13:00Z")

</div>

Not sure if i understood.  
Tried&nbsp;Rget “print(ls())” and it lists the same functions. my Rcmd “source(‘file.R’)” added no new functions.

---

<div class="post-metadata">

**Author:** ![kuentang](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kuentang](https://forum.kx.com/u/kuentang)\
**Post date:** [November 29, 2013, 9:20am UTC](https://forum.kx.com/t/rserver-for-q/8522/10 "2013-11-29T09:20:00Z")

</div>

Using cwd() you will see where R is actually pointing. Then change the path to the directory where the R script is located. Then try to source the R file again.\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

If it is still not working just ask.\<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) [[mailto:personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)] **Im Auftrag von** naveen sharma  
**Gesendet:** Freitag, 29. November 2013 10:14  
**An:** [personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)  
**Betreff:** Re: [personal kdb+] rserver for q\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

Not sure if i understood.\<o:p\>\</o:p\>

Tried&nbsp;Rget “print(ls())” and it lists the same functions. my Rcmd “source(‘file.R’)” added no new functions.

---

<div class="post-metadata">

**Author:** ![naveen\_sharma](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@naveen\_sharma](https://forum.kx.com/u/naveen_sharma)\
**Post date:** [November 29, 2013, 9:36am UTC](https://forum.kx.com/t/rserver-for-q/8522/11 "2013-11-29T09:36:00Z")

</div>

Thanks a bunch! works ine now.
