Skip to content

The ttest.c example in R under MS Windows

2 messages · Lennart.Borgman@astrazeneca.com, Duncan Murdoch

#
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:
To remove the Statistics menu use del.ttest()
[click on `Statistics' from the menu, choose `ttest:1' and fill in.]
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
----------------------------------------------------------------------------
--
Notice:  This e-mail message, together with any attachments,...{{dropped}}
#
On Wed, 11 Feb 2004 17:24:44 +0100, Lennart.Borgman at astrazeneca.com
wrote :
Some of the tools get confused by spaces in pathnames.  It's better to
put things in a path with no spaces in it.

Duncan Murdoch