similar to: Fwd: Re: calling R's library using C

Displaying 20 results from an estimated 800 matches similar to: "Fwd: Re: calling R's library using C"

2006 Mar 02
1
calling R's library using C
Hi, Thanks, everyone for all the help! So, here is my calling function in C (called test.c): #include<stdio.h> #include<stdlib.h> #include<Rmath.h> int main(void) { printf("%f \n",pchisq(2.,7., 1, 0)); printf("%f \n",pnchisq(2.,7.,0., 1, 0)); return EXIT_SUCCESS; } I compile using: gcc test.c -I/usr/lib/R/include
2012 Jan 27
2
The following code (using rgamma) hangs
Hi, I'm seeing something that may be a bug in R's standalone math library, which is packaged by Debian as r-mathlib. I reported it to the Debian BTS as http://bugs.debian.org/657573 I'm using Debian squeeze, and the code was tested with r-mathlib 2.11.1-6 (default on stable) and 2.14.1-1 (from testing/unstable). I summarize this report below. The following code with the R math
2004 Apr 14
2
again question about nmath/standalone
Hello, I forgot to tell you that I am using Linux OS. And I can?t find directory "src/nmath/standalone". I will send you the test code I am using and the whole operation process. [credsim at confsys ~/src]$ gcc test1.c -o test1 -lRmath test1.c: In function `main': test1.c:18: warning: assignment makes pointer from integer without a cast test1.c:19: warning: assignment makes
2004 Jun 22
1
R mathlib
Hello, dear R experts! I run R on Debian 'sarge' platform. There is 'r-mathlib' package in Debian distribution, which is described as: $ dpkg --status r-mathlib ... This packages provides the libRmath shared and static libraries which can be called from standalone C or C++ code. Well, I use runif() function in test_runif.c: #include <Rmath.h> main() { // ...
2002 Jan 14
1
trouble using R Mathlib as standalone
Dear People, I am trying to use R's Math library as standalone, as documented in /src/nmath/standalone. I am using C++ in Debian testing, and the versions are as follows: ii g++-3.0 3.0.3-1 The GNU C++ compiler. ii r-mathlib 1.4.0-1 `GNU S' - Standalone R math library I have a file (rand.cc) as follows. I don't think that lattice.hh or mh.hh are very
2007 May 31
1
Problems when linking to R shared library
Folks, I'm fairly sure that I'm doing something stupid, but I'm getting a few really strange results from *some* of the distributions, but by no means all, when I link directly to the R shared library. I've tried this on both Windows with the precompiled Mingw binary of R-2.5.0 (compiling my code with MinGW-3.4.2), and by building R-2.5.0 on Mandriva Linux with gcc-3.4.4 and
2004 Apr 14
1
question about /nmath/standalone
Hello, I can't link a c code with Mathlib according to introduction of R manual "Writing R Extensions", page 60. It is written : "It is possible to build Mathlib, the R set of mathematical functions documented in 'Rmath.h?, as a standalone library 'libRmath? under Unix and Windows. (This includes the functions documented in Section 5.7 [Numerical analysis
2023 Feb 16
0
User-defined RNG with the standalone Rmath library
I have two questions about using a user-defined random number generator (RNG) with the standalone Rmath library. The default RNG with the standalone Rmath library is the Marsaglia-multicarry generator, which has poor properties. The "R Installation and Administration" manual, in the section "The standalone Rmath library", states that: ``` A little care is needed to use the
2004 Apr 22
2
Urgent:again question about nmath/standalone
Hello, all, I have the same question as the last mail I sent. I have installed libRmath in my system. But I still can not link Rmath through -lRmath. The whole process is as follow.Is there anybody who is so kind to help me find out the problem? I will appreciate very much. [credsim at confsys ~]$ cd /usr/lib [credsim at confsys lib]$ ls -l libR* -rw------- 1 bcdesai bcdesai 237828 Apr
2003 Dec 14
1
compile error with C code and standalone R math C library
Dear People, I just went back to an old piece of C code. On trying to compile it with the R math standalone C library I got the following error. Can anyone enlighten me what I am doing wrong, if anything? C file (rr-sa.c) follows. I'm on Debian sarge. I'm running R version 1.8.1. Gcc is version 3.3.1. Thanks in advance. Faheem.
2006 Feb 20
2
R CMD config --cppflags buglet
As you may recall, a Debian user complained last year about how R is out of line with respect to the filesystem standards (where, in essence, architecture independent files should be in /usr/share, not /usr/lib). While I more or less just told him to get lost, I think it was mostly BDR who actually added support for this over the summer -- so a public Thanks! first. As of a few weeks ago, I now
2006 Dec 18
1
Rmath: R libraries from C on Mac OS X
Dear R-experts, I have been having trouble using R's standalone random number generators from C on my Mac OS X 10.4.8 system. I try to compile my C program in the following way: gcc -Wall -o helloMac helloMac.c -lm -lRmath I get the following error: /usr/bin/ld: can't locate file for: -lRmath I am unable to locate Rmath on my machine. The problem appears to be that no libRmath.a was
2004 Mar 19
1
R_qsort_int_I() error
Hi, I want to use R_qsort_int_I() in my C function, but getting the following error. It looks like there is a conflict between Rmath.h, which I use to generate random numbers, and R_ext/Boolean.h I would appreciate any help to fix this problem. gcc -ansi -g -o Gibbs gibbs.c subroutines.o rand.o vector.o -lm -lRmath -llapack -lblas -lfrtbegin -lg2c -lm -shared-libgcc In file included from
2004 Nov 02
0
how to call function in ../src/main
Hi, This is Kotien Wu from NIH/NCI. We want to use R function for our web: http://cgap.nci.nih.gov It works for functions in R/R-1.9.1/src/nmath/standalone very well. We have function GetPvalueForT.c which has #define MATHLIB_STANDALONE 1 #include <Rmath.h> double GetPvalueForT ( double t, double deg ) { return 2 * pt(t, deg, 0, 0); } We create GetPvalueForT.i, which has /* File :
2005 Aug 11
1
include C functions from nmath in my own C functions
Hi: I followed the README in src/nmath/standalone/ to make the use the command "make shared" to make the libRmath.so file. I also add the directories containg libRmath.so to LD_LIBRARY_PATH by using command "export D_LIBRARY_PATH=$LD_LIBRARY_PATH:$/home/zhliu/Backup/R-2.0.1/src/nmath/standalon e " However, when I try to run the following codes by the command
2007 Sep 11
4
Installing Asterisk on to CentOS 4
Hi expets, I have installed Asterisk 1.4.11 on CentOS4 successfully without any error. But when i am trying to start asterisk with following cmd i am getting unknown command. [cybercall at ip-208-109-177-212 ~]$ asterisk -vvvvvvc -bash: asterisk: command not found [cybercall at ip-208-109-177-212 ~]$ I checked modules and other configuration files which are installed correctly. Please help me
2006 Mar 01
3
library file for R's nmath routines
Hi, I am wondering where the library file for R's nmath routines are? Doing a search on libR gave me the following: /usr/lib/libRKC16.so.1.2.0 /usr/lib/libRKC.so.1.2.0 /usr/lib/R/lib/libRlapack.so /usr/lib/R/lib/libR.so /usr/lib/libRKC.so.1 /usr/lib/libRKC16.so.1 None of these have the functions in nmath. Any help? Many thanks and best wishes! GT
2011 Aug 04
1
How to seed the R random number generator in C (standalone) with an instance of .Random.seed
hello all, I use the R standalone math library in my own C program, and the default R random number generator can be seeded with set_seed(const unsigned int, const unsigned int). How could I seed the RNG with an instance of .Random.seed ? I would need this or a similar workaround for debugging purposes. More precisely, I use the default R random number generator to sample from various
2007 Jul 27
4
Asterisk Wiki
Hi List; I am trying to use wiki via the link (http://www.voip-info.org/wiki/index.php?page=Asterisk) in effective way to find the needed resource for me, but still it is hard to arrive for the needed information. For example: what is the best (shortest) way to search for information related to the command playbak()? Using the backlines, it make the eyes feel hard by keep reading without
2002 Jan 24
2
random number generation issues with r and compiled C code
Dear People, I have been writing a simulation routine that is currently entirely written in c++. I've been using the R standalone math library to give me random number generation for this. However, I have had to set the seed myself, and I am using set_seed(time(NULL), clock) for every call to unif_rand(). However, this works really badly. The random numbers aren't uniform at all. Does