[Rd] Embedding R in C application
To whom it may concern, I am very interested in embedding the R functionality in our application. This is a C application that currently runs on Win32, but will also run on Linux in the future. From the material that I have seen, I need R compiled as a shared library to evaluate R expressions from C. Is this correct? If so, can I download this shared library from somewhere? Is there any API document pertaining to this shared library? Thanks for you time, Chad Jenness 763-229-0427 [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Embedding R in C application
I have done this and it sounded like all that I needed to do is #include to get access to R functionality. However, I was getting compiling errors when attempting to make an R function call directly from C, so I did some research, and this is where I saw the reference to needing the libR.so. By just including R.h, does this provide me with the same R functionality as the references that I saw about the libR.so? If so, then I will continue to use this to access the R functionality and use the "Writing R Extensions" manual. Thanks, Chad Jenness 763-229-0427 -Original Message- From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Friday, June 24, 2005 8:30 AM To: [EMAIL PROTECTED] Cc: r-devel@r-project.org Subject: Re: [Rd] Embedding R in C application On 6/24/2005 9:18 AM, [EMAIL PROTECTED] wrote: > To whom it may concern, > I am very interested in embedding the R functionality in our > application. This is a C application that currently runs on Win32, but > will also run on Linux in the future. From the material that I have > seen, I need R compiled as a shared library to evaluate R expressions > from C. Is this correct? If so, can I download this shared library from > somewhere? Is there any API document pertaining to this shared library? You want to look at the "Writing R Extensions" manual, in particular the chapters on the R API (for access to the underlying computational routines) and the one on linking GUIs or other front-ends (which sounds more like what you want to do). Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Embedding R in C application
I have read this section and it appears to be what I am looking for. Thanks for all of your help, Chad Jenness 763-229-0427 -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Friday, June 24, 2005 9:08 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; r-devel@r-project.org Subject: Re: [Rd] Embedding R in C application You need to read the correct part of the manual (and you need a manual from R >= 2.1.0). You are writing a front-end, so read * Linking GUIs and other front-ends to R:: as Duncan suggested. Your comments are not at all consistent with what I wrote there. On Fri, 24 Jun 2005 [EMAIL PROTECTED] wrote: > I have done this and it sounded like all that I needed to do is > #include to get access to R functionality. However, I was > getting compiling errors when attempting to make an R function call > directly from C, so I did some research, and this is where I saw the > reference to needing the libR.so. By just including R.h, does this > provide me with the same R functionality as the references that I saw > about the libR.so? If so, then I will continue to use this to access > the R functionality and use the "Writing R Extensions" manual. > > Thanks, > Chad Jenness > 763-229-0427 > > > -Original Message- > From: Duncan Murdoch [mailto:[EMAIL PROTECTED] > Sent: Friday, June 24, 2005 8:30 AM > To: [EMAIL PROTECTED] > Cc: r-devel@r-project.org > Subject: Re: [Rd] Embedding R in C application > > > On 6/24/2005 9:18 AM, [EMAIL PROTECTED] wrote: >> To whom it may concern, >> I am very interested in embedding the R functionality in our >> application. This is a C application that currently runs on Win32, >> but will also run on Linux in the future. From the material that I >> have seen, I need R compiled as a shared library to evaluate R >> expressions from C. Is this correct? If so, can I download this >> shared library > from >> somewhere? Is there any API document pertaining to this shared > library? > > You want to look at the "Writing R Extensions" manual, in particular > the > > chapters on the R API (for access to the underlying computational > routines) and the one on linking GUIs or other front-ends (which > sounds more like what you want to do). > > Duncan Murdoch > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Error in compiling R
When compiling R on Windows, I am getting the following error. Does anyone have any suggestions? -- Making package datasets adding build stamp to DESCRIPTION installing R files installing data files preparing package datasets for lazy data loading Error in load(zfile, envir = envir) : input has been corrupted, with LF replaced by CR Execution halted make[4]: *** [lazydata] Error 1 make[3]: *** [all] Error 2 make[2]: *** [pkg-datasets] Error 2 make[1]: *** [rpackage] Error 1 make: *** [all] Error 2 Thanks, Chad Jenness Electronic Payment Business Services Office: 612-667-9782 Email: [EMAIL PROTECTED] "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation" [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Error in compiling R
Thanks, I got this resolved. Now to embed the R.dll into a C application, do I need to compile R with any shared library flags set? Chad Jenness Electronic Payment Business Services Office: 612-667-9782 Email: [EMAIL PROTECTED] "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation" -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 28, 2005 7:47 AM To: [EMAIL PROTECTED] Cc: r-devel@r-project.org Subject: Re: [Rd] Error in compiling R On Tue, 28 Jun 2005 [EMAIL PROTECTED] wrote: > When compiling R on Windows, I am getting the following error. Does > anyone have any suggestions? Yes, it seems you have corrupted the files during unpacking. Did you use the version of tar in the Rtools.zip? Whatever you used to unpack the files has changed LF to CR line endings. Winzip is notorious for doing things like that. Only a very few tools will unpack that tar file (which contains symbolic links) correctly. Which is why we provide one, and issue a warning in the R Installation and Administration manual. > -- Making package datasets > adding build stamp to DESCRIPTION > installing R files > installing data files > preparing package datasets for lazy data loading > Error in load(zfile, envir = envir) : input has been corrupted, with > LF replaced by CR > Execution halted > make[4]: *** [lazydata] Error 1 > make[3]: *** [all] Error 2 > make[2]: *** [pkg-datasets] Error 2 > make[1]: *** [rpackage] Error 1 > make: *** [all] Error 2 > > > Thanks, > Chad Jenness > Electronic Payment Business Services > Office: 612-667-9782 > Email: [EMAIL PROTECTED] > > "This message may contain confidential and/or privileged information. > If you are not the addressee or authorized to receive this for the > addressee, you must not use, copy, disclose, or take any action based > on this message or any information herein. If you have received this > message in error, please advise the sender immediately by reply e-mail > and delete this message. Thank you for your cooperation" > > > [[alternative HTML version deleted]] > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Linking C/C++ GUI to R.dll
Hi, I am in the process of linking a C/C++ application to the R.dll directly. I have obtained the R source code and compiled it successfully. I have also successfully linked the R.dll directly into our application and have made calls successfully into the R.dll that are included in the sample rtest.c and in the "Writing R Extensions - The R API". The R functionality that we are interested in embedding into our application is the data analysis and graphics. However, I did not see any references to this in the R API section of the documentation. Is this functionality available from our C/C++ application via the R.dll? If so, how do we access this functionality? Thank you, Chad Jenness Electronic Payment Business Services Office: 612-667-9782 Email: [EMAIL PROTECTED] "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation" [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Linking C/C++ GUI to R.dll
Is there any way that we can get it to the C level API? Or is there a C level API function that will give us access to more of the R functionality? Chad Jenness Electronic Payment Business Services Office: 612-667-9782 Email: [EMAIL PROTECTED] "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation" -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 9:49 AM To: Jenness, Chad P. Cc: r-devel@stat.math.ethz.ch Subject: Re: [Rd] Linking C/C++ GUI to R.dll On Wed, 14 Dec 2005 [EMAIL PROTECTED] wrote: > Hi, > > I am in the process of linking a C/C++ application to the R.dll > directly. I have obtained the R source code and compiled it > successfully. I have also successfully linked the R.dll directly into > our application and have made calls successfully into the R.dll that > are included in the sample rtest.c and in the "Writing R Extensions - > The R API". > > The R functionality that we are interested in embedding into our > application is the data analysis and graphics. However, I did not see > any references to this in the R API section of the documentation. Is > this functionality available from our C/C++ application via the R.dll? > If so, how do we access this functionality? By reading the section on 'linking GUIs and other front-ends'. It is not in the C-level API. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Linking C/C++ GUI to R.dll
Is there any way that we can get it to the C level API? Or is there a C level API function that will give us access to more of the R functionality? Also, is there a series of examples on how to use the C level API? Chad Jenness Electronic Payment Business Services Office: 612-667-9782 Email: [EMAIL PROTECTED] "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation" -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 9:49 AM To: Jenness, Chad P. Cc: r-devel@stat.math.ethz.ch Subject: Re: [Rd] Linking C/C++ GUI to R.dll On Wed, 14 Dec 2005 [EMAIL PROTECTED] wrote: > Hi, > > I am in the process of linking a C/C++ application to the R.dll > directly. I have obtained the R source code and compiled it > successfully. I have also successfully linked the R.dll directly into > our application and have made calls successfully into the R.dll that > are included in the sample rtest.c and in the "Writing R Extensions - > The R API". > > The R functionality that we are interested in embedding into our > application is the data analysis and graphics. However, I did not see > any references to this in the R API section of the documentation. Is > this functionality available from our C/C++ application via the R.dll? > If so, how do we access this functionality? By reading the section on 'linking GUIs and other front-ends'. It is not in the C-level API. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel