[R] The ttest.c example in R under MS Windows
Lennart.Borgman@astrazeneca.com
Lennart.Borgman at astrazeneca.com
Wed Feb 11 17:24:44 CET 2004
Thank you Andy, and thank you to all others who responded.
I downloaded the tools and the compiler (though I used MSYS from the MINGW
site, which seems to have the desired tools). From the bash shell that comes
with MSYS I ran the commands in readme.packages:
$ cd R_HOME/src/gnuwin32
$ make libR.a libRblas.a
They seemed to work fine. Then I believe I am missing something crucial. I
found a directory windlgs in the C:\Program Files\R\rw1081\src\library
directory. So I cd-ed to this and tried to run the install command (again
from the bash shell where the tools are in the path):
$ rcmd install windlgs
make: *** No rule to make target `Files/R/rw1081/src/library'. Stop.
*** Installation of windlgs failed ***
What is missing here?
- Lennart
-----Original Message-----
From: Liaw, Andy [mailto:andy_liaw at merck.com]
Sent: 10 februari 2004 15:57
To: Borgman, Lennart; r-help at stat.math.ethz.ch
Subject: RE: [R] The ttest.c example in R under MS Windows
Works just fine for me with the recommended compilers and tools. Here's a
transcript of the build:
c:\tools\R-1.8.1\src\gnuwin32>Rcmd install windlgs
---------- Making package windlgs ------------
adding build stamp to DESCRIPTION
making DLL ...
making ttest.d from ttest.c
gcc -Ic:/tools/R-1.8.1/src/include -Wall -O2
-Ic:/tools/R-1.8.1/src/gnuwin32/
graphapp -c ttest.c -o ttest.o
ar cr windlgs.a *.o
ranlib windlgs.a
windres --include-dir c:/tools/R-1.8.1/src/include -i windlgs_res.rc -o
windlgs
_res.o
gcc --shared -s -o windlgs.dll windlgs.def windlgs.a windlgs_res.o
-Lc:/tools
/R-1.8.1/src/gnuwin32 -lg2c -lR
... DLL made
installing DLL
installing R files
installing man source files
installing indices
installing help
>>> Building/Updating help pages for package 'windlgs'
Formats: text html latex example
menu.ttest text html latex example
>>> Building/Updating help pages for package 'windlgs'
Formats: chm
menu.ttest chm
Microsoft HTML Help Compiler 4.74.8702
Compiling c:\tools\R-1.8.1\src\gnuwin32\windlgs\chm\windlgs.chm
Compile time: 0 minutes, 2 seconds
2 Topics
4 Local links
0 Internet links
1 Graphic
Created c:\tools\R-1.8.1\src\gnuwin32\windlgs\chm\windlgs.chm, 22,531 bytes
Compression increased file by 8,709 bytes.
adding MD5 sums
And here's the test:
> library(windlgs)
To remove the Statistics menu use del.ttest()
> x <- runif(10)
> y <- runif(20)
[click on `Statistics' from the menu, choose `ttest:1' and fill in.]
> menu.ttest()
Welch Two Sample t-test
data: x and y
t = 2.1473, df = 22.03, p-value = 0.04303
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
0.007352435 0.422008138
sample estimates:
mean of x mean of y
0.6706490 0.4559688
Andy
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of
> Lennart.Borgman at astrazeneca.com
> Sent: Tuesday, February 10, 2004 8:27 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] The ttest.c example in R under MS Windows
>
>
> We are trying to compile and run the ttest.c example that
> comes with R (in
> C:\Program Files\R\rw1081\src\library\windlgs\src\ttest.c).
> After compiling
> it with MS Visual C++ we load the DLL with dyn.load.
>
> So far it seems good, but when we try to call it from R (after running
> C:\Program Files\R\rw1081\src\library\windlgs\R\windlgs.R) R crashes.
>
> We have tried changing the exports from DLL but have failed
> so far. Since I
> have a guy helping me who is fluent in MS Visual C++ I believe we are
> missing something crucial. Have anyone compiled and used the
> example above
> using MS Visual C++? Has anyone done this using the gcc (or
> Mingw) compiler
> on MS Windows?
>
> I would be very glad to find a complete example for compiling under MS
> Windows.
>
>
> - Lennart
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
----------------------------------------------------------------------------
--
Notice: This e-mail message, together with any attachments,...{{dropped}}
More information about the R-help
mailing list