Displaying 20 results from an estimated 20000 matches similar to: "newbie question: call C function from R in Windows XP"
2004 Jun 27
1
Re: help in R calling C function (Lei Liu)
> Message: 4
> Date: Sun, 27 Jun 2004 03:18:43 -0400
> From: Lei Liu <liulei at l.imap.itd.umich.edu>
> Subject: [R] help in R calling C function
> To: r-help at stat.math.ethz.ch
> Message-ID: <5.1.0.14.1.20040627030746.014936b8 at l.imap.itd.umich.edu>
> Content-Type: text/plain; charset="us-ascii"; format=flowed
>
> Hi there,
>
> I want
2007 Feb 01
2
Calling C code from R
Hi!
Thanks in advance.
I am using R-2.4.0 on Windows XP. I am trying to create dll file.
My C code:
/* useC1.c */
void useC(int *i) {
i[6] = 100;
}
I have tried to create useC1.dll.
C:\R-2.4.0\bin>R CMD SHLIB useC1.c
'perl' is not recognized as an internal or external command, operable program or batch file.
Then I have tried:
2005 Feb 17
2
package bulding in windows.
Hello everyone.
I am using R 2.0.1 in windows XP sp2 and I want to create a package.
I get the following errors when I run these commands at the dos prompt.
Please help.
Thanks.
NIshan
F:\Program Files\R\rw2001\bin>Rcmd build f:\testingskeke
* checking for file 'f:\testingskeke/DESCRIPTION' ... OK
* preparing 'f:\testingskeke':
* cleaning src
*
2008 Mar 31
1
Compile dll in Windows XP
This is my first attempt to call a C function from R. I have installed Rtools,MinGW and Perl and I have included them in my system path. I am trying to compile a toy function that can be called in R but when I type "RCMD SHLIB foo.c" I receive the following message in my Command prompt:
making foo.d from foo.c
make: [foo.d] Error 255 (ignored)
cat: foo.d: No such file or directory
make:
2007 Feb 04
1
Fwd: Re: Calling C code from R
Hi!
Thanks in advance.
Thanks to all of you who have responded to me on above. This is one of the responses I received on above.
I have installed perl (with path C:\Perl\bin\;) an MinGW (with path C:\MinGW\bin; C:\MinGW;).
At the Command Prompt (C:\R-2.4.0\bin) I have typed:
C:\R-2.4.0\bin>Rcmd SHLIB useC1.c
(No error and useC1.dll file has not been created)
2014 Oct 08
1
RCMD SHLIB problem in 64 bits
I am trying to build a dll writen in C to be called by R.
Interestingly, when I set the global environment variable PATH to be
"c:\Rtools\bin;C:\Rtools\gcc-4.6.3;C:\Program Files\R\R-3.1.1\bin\*i386*;"
and I typed "RCMD SHLIB Permutation.c" in Cygwin, the dll was compiled and
I can sucessfully call functions after I had loaded it into 32 bits R via
.Call.
However, now I want
2004 Jun 27
1
help in R calling C function
Hi there,
I want to call a C function in R. I have some experience on it, but this
time I need to call another C function in the "main" C function. As a
simple example, I use the following C code:
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
void main(double *alpha)
{
double test();
double beta;
beta= *alpha *2 +
2010 Mar 11
2
Problem with rcmd SHLIB
Hi all,
I am trying to call a C function from R (version 2.10.1) on a windows machine.
The C code is in a .c file, I have pasted the code below although I'm very confident that it does not contain any errors (it is not my code), but also, the problem that I have occurs with every .c file that I have tried this with.
I have installed Rtools and included:
C:\Rtools\bin; C:\Rtools\perl;
2003 Sep 29
2
problem in integrating C routine with R on windows XP
Hi All,
I a C function code, which has been successed in integrating
with Splus on Unix. Now I want to move it on windows.
So I want to integrate this C function with R on windows XP.
I download tools.zip and saved it in c:\bin directory,
download MinGW and saved it in c:\MinGw directory,
download Perl and saved it in c:\Perl directory.
My path is set as:
2005 Feb 15
2
Making a Package
Hello.
I have what I know to be a simple question, but never having done anything like this it is
pretty tough.
I'm trying to write an R package. I have a collection of functions that I loaded into R and
then used package.skeleton(). After editing everything in the resulting folder, call it
NewPackage, I tried to follow along with some instructions I found for Windows users.
I installed
2010 Dec 18
1
Rcmd SHLIB error
I am getting this error message when I try to run Rcmd SHLIB myprog.c.
There appears to be a missing / between etc and i386 in the path. I
am on Windows Vista and am using R version 2.12.1 Patched (2010-12-16
r53864) and just downloaded Rtools 2.12 today. Is this a bug in R?
How can I resolve this?
C:\tmp2>Rcmd SHLIB myprog.c
cygwin warning:
MS-DOS style path detected:
2023 Aug 30
1
Problems with installing R packages from source and running C++ in R, even on fresh R installation
TL:DR there are at least three maybe four ways to address this depending on what you plan to do.
I usually adjust PATH to add Rtools using .Rprofile. But if you do that then if you want to use the command line to invoke R then you need to set the PATH separately when you start the shell. For this reason some people like to set it in the User Environment Variables control panel... but some Rtools
2007 May 03
2
R package development in windows
I'm attempting to build an R package for distribution and am working
from the directions found at
http://www.maths.bris.ac.uk/~maman/computerstuff/Rhelp/Rpackages.html#Wi
n-Win
I've read through Writing R Extensions and various other "helpful" web
sites. I've installed all relevant software (perl, cygwin, mingwin,
hhc.exe). Here is what I have done so far:
1) Sourced data
2003 Sep 02
2
FW: Creating a Package with Windows XP.
> Hi there fellow R-Users,
>
> I am trying to use the "package.skeleton" to create my own package with
> R.1.7.1 on Windows XP Professional.
> I have followed the package.skeleton example and have downloaded the
> necessary files found at http://www.stats.ox.ac.uk/pub/Rtools/tools.zip.
>
> and perl5, available via
2023 Aug 30
1
Problems with installing R packages from source and running C++ in R, even on fresh R installation
On Wed, 30 Aug 2023 16:31:20 +0000
Christophe Bousquet <chr_bousquet at protonmail.com> wrote:
> So, yes, it seems possible for R to localize paths related to
> Rtools... But then, I really do not get where things go wrong...
When installing packages containing code to compile, R eventually calls
R CMD SHLIB. Same thing happens with inline C++: it gets stored in a
temporary file,
2007 Mar 28
2
changes in behaviour of Rcmd SHLIB since 2.4.0
Dear all,
I have some C code using the zlib uncompress. It compiles fine under Win XP
(with SP2) with R up to 2.3.1 and generates four files (Makedeps, *.d,
*.dll, and *.o):
C:\Data\R-packages\cmg>rcmd SHLIB cmg.c -o cmg.dll
latex: not found
making cmg.d from cmg.c
gcc -IC:/PROGRA~1/R/R-2.3.1/include -Wall -O2 -c cmg.c -o cmg.o
cmg.c: In function `readcmg':
cmg.c:33: warning:
2004 Nov 07
2
Problem with dyn.load()
Hi!
I am studying C language to run with R 2.0.0. My system (Windows ME /BR) is configured to run RCMD ( I have installed ActivePerl, Rtools and MinGW as indicated in http://www.murdoch-sutherland.com/Rtools/ an with correct path).
I would like run the coded write below named conv.c (Example from "Write R Extension") :
#include <R.h>
#include <Rinternals.h>
2002 Aug 04
3
Fortran DLLs
Hello everyone,
I'm using R 1.5.1 on Windows.
I chose the option 'Install Source Files' when installing R.
The code below shows my use of the command SHLIB and the error I get.
C:\R\rw1051\bin>Rcmd SHLIB C:\Stage 9 (Phase 2)\cir3int.f
'perl' is not recognized as an internal or external command,
operable program or batch file.
I'm assuming I'm missing some perl
2004 Nov 07
4
writing a simple package in R 2.0 under Windows XP
Dear listers,
I have developped a set of functions that I would like to package on a
Windows XP plateform for some friends (this would be more simple than to
deliver them as a source text file without handy help). I am working under
Windows XP.
Of course I have gone through the manual "Writing R extension" and try to
sort out what a most simple "packaging" for beginner
2002 Aug 13
1
Rcmd SHLIB under NT
Hello:
I'm trying to use Rcmd SHLIB to compile a single file, sann.c, to
get sann.dll.
I was able to get
make libR.a
to work, after going into MkRules and changing the line
DLLTOOL=$(BINPREF)dlltool -k --as $(AS)
to read
DLLTOOL=C:/MINGW-1.1/bin/dlltool -k --as $(AS)
But now I get:
C:\rw1051\src\gnuwin32>Rcmd SHLIB sann.c
make: make: Command not found
make: *** [libR] Error 127