Re: [R] Problem installing Hmisc (more info)

2005-02-05 Thread Prof Brian Ripley
On Sat, 5 Feb 2005, Michael Kubovy wrote:
Following Brian Ripley's advice:
$ which g77
/sw/bin/g77
So I think you have fink.
I then found Makeconf, in 
/Library/Frameworks/R.framework/Versions/2.0.1/Resources/etc

I edited it according to Brian's advice. It had:
You didn't.  You need to replace 
L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2 appropriately.


FLIBS =  -L/usr/local/lib 
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2 
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -lfrtbegin 
-lg2c -lSystem
which now is:
FLIBS =  -L/usr/local/lib 
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2 
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -L/sw/bin -lg2c 
-lSystem
Nevertheless the install failed just as below. But the console complaint was 
slightly different from before:
WARNING: ignoring environment value of R_HOME
* Installing *source* package 'Hmisc' ...
** libs
g77   -fno-common  -g -O2 -c cidxcn.f -o cidxcn.o
g77   -fno-common  -g -O2 -c cidxcp.f -o cidxcp.o
g77   -fno-common  -g -O2 -c hoeffd.f -o hoeffd.o
g77   -fno-common  -g -O2 -c jacklins.f -o jacklins.o
g77   -fno-common  -g -O2 -c largrec.f -o largrec.o
gcc -no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include 
-I/usr/local/include   -fno-common  -g -O2 -c ranksort.c -o ranksort.o
g77   -fno-common  -g -O2 -c rcorr.f -o rcorr.o
g77   -fno-common  -g -O2 -c wclosest.f -o wclosest.o
gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o 
Hmisc.so cidxcn.o cidxcp.o hoeffd.o jacklins.o largrec.o ranksort.o rcorr.o 
wclosest.o  -L/usr/local/lib 
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2 
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -L/sw/bin -lg2c 
-lSystem -lcc_dynamic -framework R
ld: warning -L: directory name 
(/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2) does not exist
ld: warning -L: directory name 
(/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../..) does not exist
ld: can't locate file for: -lg2c
make: *** [Hmisc.so] Error 1
ERROR: compilation failed for package 'Hmisc'
** Removing 
'/Library/Frameworks/R.framework/Versions/2.0.1/Resources/library/Hmisc'
** Restoring previous 
'/Library/Frameworks/R.framework/Versions/2.0.1/Resources/library/Hmisc'

On Feb 5, 2005, at 4:59 PM, Prof Brian Ripley wrote:
On Sat, 5 Feb 2005, Michael Kubovy wrote:
Frank Harrell suggested I re-post with information about the version of
R
Thanks, that starts to make sense.  You appear to have g77 installed, but 
not in the place the person who prepared the binary install of R has it.
Where do you have it installed?  ('whereis g77' or 'which g77' should tell 
you.)  Then you need to alter FLIBS in R_HOME/etc/Makeconf to point to it. 
(You can remove -lfrtbegin from FLIBS: it is not needed: your R_HOME looks 
to be /Library/Frameworks/R.framework/Versions/2.0.1.)

However, I believe there is a more fundamental problem: because libg2c is 
a static library on current MacOS X, most packages using Fortran cannot be 
compiled there.  That's presumably the case with Hmisc, as the automated 
package builder is not providing a binary build.  (There is supposedly a 
check directory on CRAN, but it is not there at present.)

Heres's the information:
 version
 _
platform powerpc-apple-darwin6.8
arch powerpc
os   darwin6.8
system   powerpc, darwin6.8
status
major2
minor0.1
year 2004
month11
day  15
language R
Here's what happens when I try to install:
 install.packages("Hmisc")
trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
Content type `text/plain; charset=iso-8859-1' length 47565 bytes
opened URL
==
downloaded 46Kb
trying URL `http://cran.r-project.org/src/contrib/Hmisc_3.0-1.tar.gz'
Content type `application/x-tar' length 453567 bytes
opened URL
==
downloaded 442Kb
Delete downloaded files (y/N)?
The packages are in /tmp/Rtmp1911/Rinstdirfc4111
Warning message:
Installation of package Hmisc had non-zero exit status in:
install.packages("Hmisc")
Here's what the Console had to say:
* Installing *source* package 'Hmisc' ...
** libs
g77   -fno-common  -g -O2 -c cidxcn.f -o cidxcn.o
g77   -fno-common  -g -O2 -c cidxcp.f -o cidxcp.o
g77   -fno-common  -g -O2 -c hoeffd.f -o hoeffd.o
g77   -fno-common  -g -O2 -c jacklins.f -o jacklins.o
g77   -fno-common  -g -O2 -c largrec.f -o largrec.o
gcc -no-cpp-precomp
-I/Library/Frameworks/R.framework/Resources/include
-I/usr/local/include   -fno-common  -g -O2 -c ranksort.c -o ranksort.o
g77   -fno-common  -g -O2 -c rcorr.f -o rcorr.o
g77   -fno-common  -g -O2 -c wclosest.f -o wclosest.o
gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o
Hmisc.so cidxcn.o cidxcp.o hoeffd.o jacklins.o largrec.o ranksort.o
rcorr.o wclosest.o  -L/usr/local/lib
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -lfrtbegin
-lg2c -lSystem -lcc_dynami

Re: [R] Problem installing Hmisc (more info)

2005-02-05 Thread Jindan Zhou
I had problem installing Hmisc and Dedign a couple of weeks ago,
repetitively.
It failed at the stage compiling the last help file (summary, I
remember), after long time sucking up system resource. What I did was
updated some development tools, such as glibc, gcc, automake, etc., I
can't tell which one worked for me, but eventually I managed to
compile those two packages with success. If you really want to know what
exactly development tools I have updated, I'd love to take a look at my
log files.

Hope this helps;-)

My information:
  R.version
  _
 platform i586-pc-linux-gnu
 arch i586
 os   linux-gnu
 system   i586, linux-gnu
 status
 major2
 minor0.1
 year 2004
 month11
 day  15
 language R

Jindan




On Sat, 5 Feb 2005, Michael Kubovy wrote:

> Frank Harrell suggested I re-post with information about the version of
> R
>
> Heres's the information:
> > >  version
> >  _
> > platform powerpc-apple-darwin6.8
> > arch powerpc
> > os   darwin6.8
> > system   powerpc, darwin6.8
> > status
> > major2
> > minor0.1
> > year 2004
> > month11
> > day  15
> > language R
>
> Here's what happens when I try to install:
> > >  install.packages("Hmisc")
> > trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
> > Content type `text/plain; charset=iso-8859-1' length 47565 bytes
> > opened URL
> > ==
> > downloaded 46Kb
> >
> > trying URL `http://cran.r-project.org/src/contrib/Hmisc_3.0-1.tar.gz'
> > Content type `application/x-tar' length 453567 bytes
> > opened URL
> > ==
> > downloaded 442Kb
> >
> > Delete downloaded files (y/N)?
> >
> > The packages are in /tmp/Rtmp1911/Rinstdirfc4111
> > Warning message:
> > Installation of package Hmisc had non-zero exit status in:
> > install.packages("Hmisc")
>
> Here's what the Console had to say:
> > * Installing *source* package 'Hmisc' ...
> > ** libs
> > g77   -fno-common  -g -O2 -c cidxcn.f -o cidxcn.o
> > g77   -fno-common  -g -O2 -c cidxcp.f -o cidxcp.o
> > g77   -fno-common  -g -O2 -c hoeffd.f -o hoeffd.o
> > g77   -fno-common  -g -O2 -c jacklins.f -o jacklins.o
> > g77   -fno-common  -g -O2 -c largrec.f -o largrec.o
> > gcc -no-cpp-precomp
> > -I/Library/Frameworks/R.framework/Resources/include
> > -I/usr/local/include   -fno-common  -g -O2 -c ranksort.c -o ranksort.o
> > g77   -fno-common  -g -O2 -c rcorr.f -o rcorr.o
> > g77   -fno-common  -g -O2 -c wclosest.f -o wclosest.o
> > gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o
> > Hmisc.so cidxcn.o cidxcp.o hoeffd.o jacklins.o largrec.o ranksort.o
> > rcorr.o wclosest.o  -L/usr/local/lib
> > -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2
> > -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -lfrtbegin
> > -lg2c -lSystem -lcc_dynamic -framework R
> > ld: warning -L: directory name
> > (/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2) does not exist
> > ld: warning -L: directory name
> > (/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../..) does not
> > exist
> > ld: can't locate file for: -lfrtbegin
> > make: *** [Hmisc.so] Error 1
> > ERROR: compilation failed for package 'Hmisc'
> > ** Removing
> > '/Library/Frameworks/R.framework/Versions/2.0.1/Resources/library/
> > Hmisc'
> > ** Restoring previous
> > '/Library/Frameworks/R.framework/Versions/2.0.1/Resources/library/
> > Hmisc'
>
>
> _
> Professor Michael Kubovy
> University of Virginia
> Department of Psychology
> USPS: P.O.Box 400400  Charlottesville, VA 22904-4400
> Parcels:  Room 102Gilmer Hall
>   McCormick Road  Charlottesville, VA 22903
> Office:   B011+1-434-982-4729
> Lab:  B019+1-434-982-4751
> Fax:  +1-434-982-4766
> WWW:  http://www.people.virginia.edu/~mk9y/
>   [[alternative text/enriched version deleted]]
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Problem installing Hmisc (more info)

2005-02-05 Thread Michael Kubovy
Following Brian Ripley's advice:

> $ which g77
> /sw/bin/g77

I then found Makeconf, in  
/Library/Frameworks/R.framework/Versions/2.0.1/Resources/etc

I edited it according to Brian's advice. It had:

> FLIBS =  -L/usr/local/lib  
> -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2  
> -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -lfrtbegin  
> -lg2c -lSystem
which now is:
> FLIBS =  -L/usr/local/lib  
> -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2  
> -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -L/sw/bin  
> -lg2c -lSystem

Nevertheless the install failed just as below. But the console  
complaint was slightly different from before:
> WARNING: ignoring environment value of R_HOME
> * Installing *source* package 'Hmisc' ...
> ** libs
> g77   -fno-common  -g -O2 -c cidxcn.f -o cidxcn.o
> g77   -fno-common  -g -O2 -c cidxcp.f -o cidxcp.o
> g77   -fno-common  -g -O2 -c hoeffd.f -o hoeffd.o
> g77   -fno-common  -g -O2 -c jacklins.f -o jacklins.o
> g77   -fno-common  -g -O2 -c largrec.f -o largrec.o
> gcc -no-cpp-precomp  
> -I/Library/Frameworks/R.framework/Resources/include   
> -I/usr/local/include   -fno-common  -g -O2 -c ranksort.c -o ranksort.o
> g77   -fno-common  -g -O2 -c rcorr.f -o rcorr.o
> g77   -fno-common  -g -O2 -c wclosest.f -o wclosest.o
> gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o  
> Hmisc.so cidxcn.o cidxcp.o hoeffd.o jacklins.o largrec.o ranksort.o  
> rcorr.o wclosest.o  -L/usr/local/lib  
> -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2  
> -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -L/sw/bin  
> -lg2c -lSystem -lcc_dynamic -framework R
> ld: warning -L: directory name  
> (/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2) does not exist
> ld: warning -L: directory name  
> (/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../..) does not  
> exist
> ld: can't locate file for: -lg2c
> make: *** [Hmisc.so] Error 1
> ERROR: compilation failed for package 'Hmisc'
> ** Removing  
> '/Library/Frameworks/R.framework/Versions/2.0.1/Resources/library/ 
> Hmisc'
> ** Restoring previous  
> '/Library/Frameworks/R.framework/Versions/2.0.1/Resources/library/ 
> Hmisc'

> On Feb 5, 2005, at 4:59 PM, Prof Brian Ripley wrote:
>
>> On Sat, 5 Feb 2005, Michael Kubovy wrote:
>>
>>> Frank Harrell suggested I re-post with information about the version  
>>> of
>>> R
>>
>> Thanks, that starts to make sense.  You appear to have g77 installed,  
>> but not in the place the person who prepared the binary install of R  
>> has it.
>> Where do you have it installed?  ('whereis g77' or 'which g77' should  
>> tell you.)  Then you need to alter FLIBS in R_HOME/etc/Makeconf to  
>> point to it.  (You can remove -lfrtbegin from FLIBS: it is not  
>> needed: your R_HOME looks to be  
>> /Library/Frameworks/R.framework/Versions/2.0.1.)
>>
>> However, I believe there is a more fundamental problem: because  
>> libg2c is a static library on current MacOS X, most packages using  
>> Fortran cannot be compiled there.  That's presumably the case with  
>> Hmisc, as the automated package builder is not providing a binary  
>> build.  (There is supposedly a check directory on CRAN, but it is not  
>> there at present.)
>>
>>>
>>> Heres's the information:
>  version
  _
 platform powerpc-apple-darwin6.8
 arch powerpc
 os   darwin6.8
 system   powerpc, darwin6.8
 status
 major2
 minor0.1
 year 2004
 month11
 day  15
 language R
>>>
>>> Here's what happens when I try to install:
>  install.packages("Hmisc")
 trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
 Content type `text/plain; charset=iso-8859-1' length 47565 bytes
 opened URL
 ==
 downloaded 46Kb

 trying URL  
 `http://cran.r-project.org/src/contrib/Hmisc_3.0-1.tar.gz'
 Content type `application/x-tar' length 453567 bytes
 opened URL
 ==
 downloaded 442Kb

 Delete downloaded files (y/N)?

 The packages are in /tmp/Rtmp1911/Rinstdirfc4111
 Warning message:
 Installation of package Hmisc had non-zero exit status in:
 install.packages("Hmisc")
>>>
>>> Here's what the Console had to say:
 * Installing *source* package 'Hmisc' ...
 ** libs
 g77   -fno-common  -g -O2 -c cidxcn.f -o cidxcn.o
 g77   -fno-common  -g -O2 -c cidxcp.f -o cidxcp.o
 g77   -fno-common  -g -O2 -c hoeffd.f -o hoeffd.o
 g77   -fno-common  -g -O2 -c jacklins.f -o jacklins.o
 g77   -fno-common  -g -O2 -c largrec.f -o largrec.o
 gcc -no-cpp-precomp
 -I/Library/Frameworks/R.framework/Resources/include
 -I/usr/local/include   -fno-common  -g -O2 -c ranksort.c -o  
 ranksort.o
 g77   -fno-common  -g -O2 -c rcorr.f -o rcorr.o
 g77   -fno-common  -g -O2 -c wclosest.f -o wclosest.o
 gcc -bundle -flat_na

[R] MC using hclus

2005-02-05 Thread Murli Nair
Has anyone used hclus to determine p-values of a subset of
features that give good class separation after clustering ? What I mean
is sampling a set of features and checking for class separation by
clustering
and then determining if the features that give the actual class
separation are
not random.
Cheers ../Murli

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] plot smooth density estimates for bivariate data

2005-02-05 Thread Yulei He
Hi, there.

Suppose I have a bivarariate data matrix y1 and y2. I want to plot a 3-D
picture of the estimated density f(y1, y2) against y1 and y2? How can I do
that? Do I use persp() or density()?

Thanks for your help.

Yulei


$$$
Yulei He
1586 Murfin Ave. Apt 37
Ann Arbor, MI 48105-3135
[EMAIL PROTECTED]
734-647-0305(H)
734-763-0421(O)
734-763-0427(O)
734-764-8263(fax)
$$

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Labelling and formatting of graphics

2005-02-05 Thread Nicholas Galwey
In the output of the code below, I want to do the following:

 

-  get hats over some of the betas

-  get the polygons stippled, not coloured grey

-  remove the tick marks at the ends of the axes.   If I put tick =
false, the whole axis disappears.

 

betahat <- c(0.04*0:150)

betahatdens <- dnorm(betahat, 3, 1)

plot(betahat, betahatdens, xlim = c(-0.2, 6.2), ylim = c(-0.09, 1), 

   type = "l", lwd = 2, xlab = NA, ylab = NA, axes = FALSE)

axis(1, pos = 0, labels = FALSE, tick = TRUE, at = c(0, 2, 3, 4, 6))

axis(2, pos = 0, labels = FALSE, tick = TRUE, at = c(0, 0.5))

text (5.5, -0.05, 

   labels = expression(italic(beta)), pos = 4, cex = 1.2)

text (c(-0.3, -0.3, -0.3), c(0.25, 0.3, 0.35), 

   labels = expression('f(',italic(beta),')'), 

   pos = 4, cex = 1.2, srt = 90)

text (2, -0.05, 

   labels = expression(italic(beta - sigma[beta])), pos = 4, cex = 1.2)

text (3, -0.05, 

   labels = expression(italic(beta)), pos = 4, cex = 1.2)

text (4, -0.05, 

   labels = expression(italic(beta + sigma[beta])), pos = 4, cex = 1.2)

selx1 <- c(4 + (6 - 4) * 0:100/100)

selx2 <- c(4 + (6 - 4) * 100:0/100)

sely1 <- dnorm(selx1, 3, 1)

sely2 <- seq(length = 101, from = 0, by = 0)

selx <- c(selx1, selx2)

sely <- c(sely1, sely2)

polygon(selx, sely, col = "gray")

selx1 <- c(2 * 0:100/100)

selx2 <- c(2 * 100:0/100)

sely1 <- dnorm(selx1, 3, 1)

sely2 <- seq(length = 101, from = 0, by = 0)

selx <- c(selx1, selx2)

sely <- c(sely1, sely2)

polygon(selx, sely, col = "gray")

 

Moreover, in the output of the code below, I want to:

 

-  get values placed by every tickmark, not just every alternate
tickmark

-  give the values to fewer places of decimals.

 

t <- c(0.01*0:900 - 4.5)

tdens <- dt(t, 6)

plot(t, tdens, xlim = c(-4.7, 4.7), ylim = c(-0.09, 0.5), 

   type = "l", lwd = 2, xlab = NA, ylab = NA, axes = FALSE)

axis(1, pos = 0, labels = FALSE, tick = TRUE, at = c(-4.5, 3.21, 4.5))

tcrit025 <- qt(0.975, 6)

tcrit005 <- qt(0.995, 6)

axis(1, pos = 0, labels = TRUE, tick = TRUE, 

   at = c(-tcrit005, -tcrit025, -1, 0, 1, tcrit025, tcrit005))

axis(2, pos = 0, labels = FALSE, tick = TRUE, at = c(0, 0.4))

text (4.2, -0.05, 

   labels = expression(italic(T)), pos = 4, cex = 1.2)

text (c(-0.4, -0.4, -0.4), c(0.2, 0.25, 0.3), 

   labels = expression('f(',italic(T),')'), 

   pos = 4, cex = 1.2, srt = 90)

text (c(2.91, 3.11), c(-0.06, -0.06),

   labels = expression(italic(t), '= 3.21'), pos = 4, cex = 1.2)

points (c(3.21, 3.21), c(0, -0.05), type = "l")

 

selx1 <- c(1 + (4.5 - 1) * 0:100/100)

selx2 <- c(1 + (4.5 - 1) * 100:0/100)

sely1 <- dt(selx1, 6)

sely2 <- seq(length = 101, from = 0, by = 0)

selx <- c(selx1, selx2)

sely <- c(sely1, sely2)

polygon(selx, sely, col = "gray")

selx1 <- -selx1

selx2 <- -selx2

sely1 <- dt(selx1, 6)

sely2 <- seq(length = 101, from = 0, by = 0)

selx <- c(selx1, selx2)

sely <- c(sely1, sely2)

polygon(selx, sely, col = "gray")

 

selx1 <- c(tcrit025 + (4.5 - tcrit025) * 0:100/100)

selx2 <- c(tcrit025 + (4.5 - tcrit025) * 100:0/100)

sely1 <- dt(selx1, 6)

sely2 <- seq(length = 101, from = 0, by = 0)

selx <- c(selx1, selx2)

sely <- c(sely1, sely2)

polygon(selx, sely, density = 20)

selx1 <- -selx1

selx2 <- -selx2

sely1 <- dt(selx1, 6)

sely2 <- seq(length = 101, from = 0, by = 0)

selx <- c(selx1, selx2)

sely <- c(sely1, sely2)

polygon(selx, sely, density = 20)

 

selx1 <- c(tcrit005 + (4.5 - tcrit005) * 0:100/100)

selx2 <- c(tcrit005 + (4.5 - tcrit005) * 100:0/100)

sely1 <- dt(selx1, 6)

sely2 <- seq(length = 101, from = 0, by = 0)

selx <- c(selx1, selx2)

sely <- c(sely1, sely2)

polygon(selx, sely, density = 20, angle = 135)

selx1 <- -selx1

selx2 <- -selx2

sely1 <- dt(selx1, 6)

sely2 <- seq(length = 101, from = 0, by = 0)

selx <- c(selx1, selx2)

sely <- c(sely1, sely2)

polygon(selx, sely, density = 20, angle = 135)

 

text (1.4, 0.32,

   labels = "Hatched area = 0.025", pos = 4, cex = 1.2)

points (c(1.5, 3), c(0.3, 0.005), type = "l")

 

text (c(2.3, 2.3), c(0.25, 0.22),

   labels = c("Cross-hatched", "area = 0.005"), pos = 4, cex = 1.2)

points (c(3, 4), c(0.2, 0.005), type = "l")

 

Can anyone advise?

 

Best wishes,

 

Nick Galwey

 


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Problem installing Hmisc (more info)

2005-02-05 Thread Prof Brian Ripley
On Sat, 5 Feb 2005, Michael Kubovy wrote:
Frank Harrell suggested I re-post with information about the version of
R
Thanks, that starts to make sense.  You appear to have g77 installed, but 
not in the place the person who prepared the binary install of R has it.
Where do you have it installed?  ('whereis g77' or 'which g77' should tell 
you.)  Then you need to alter FLIBS in R_HOME/etc/Makeconf to point to 
it.  (You can remove -lfrtbegin from FLIBS: it is not needed: your R_HOME 
looks to be /Library/Frameworks/R.framework/Versions/2.0.1.)

However, I believe there is a more fundamental problem: because libg2c is 
a static library on current MacOS X, most packages using Fortran cannot be 
compiled there.  That's presumably the case with Hmisc, as the automated 
package builder is not providing a binary build.  (There is supposedly a 
check directory on CRAN, but it is not there at present.)


Heres's the information:
 version
 _
platform powerpc-apple-darwin6.8
arch powerpc
os   darwin6.8
system   powerpc, darwin6.8
status
major2
minor0.1
year 2004
month11
day  15
language R
Here's what happens when I try to install:
 install.packages("Hmisc")
trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
Content type `text/plain; charset=iso-8859-1' length 47565 bytes
opened URL
==
downloaded 46Kb
trying URL `http://cran.r-project.org/src/contrib/Hmisc_3.0-1.tar.gz'
Content type `application/x-tar' length 453567 bytes
opened URL
==
downloaded 442Kb
Delete downloaded files (y/N)?
The packages are in /tmp/Rtmp1911/Rinstdirfc4111
Warning message:
Installation of package Hmisc had non-zero exit status in:
install.packages("Hmisc")
Here's what the Console had to say:
* Installing *source* package 'Hmisc' ...
** libs
g77   -fno-common  -g -O2 -c cidxcn.f -o cidxcn.o
g77   -fno-common  -g -O2 -c cidxcp.f -o cidxcp.o
g77   -fno-common  -g -O2 -c hoeffd.f -o hoeffd.o
g77   -fno-common  -g -O2 -c jacklins.f -o jacklins.o
g77   -fno-common  -g -O2 -c largrec.f -o largrec.o
gcc -no-cpp-precomp
-I/Library/Frameworks/R.framework/Resources/include
-I/usr/local/include   -fno-common  -g -O2 -c ranksort.c -o ranksort.o
g77   -fno-common  -g -O2 -c rcorr.f -o rcorr.o
g77   -fno-common  -g -O2 -c wclosest.f -o wclosest.o
gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o
Hmisc.so cidxcn.o cidxcp.o hoeffd.o jacklins.o largrec.o ranksort.o
rcorr.o wclosest.o  -L/usr/local/lib
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -lfrtbegin
-lg2c -lSystem -lcc_dynamic -framework R
ld: warning -L: directory name
(/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2) does not exist
ld: warning -L: directory name
(/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../..) does not
exist
ld: can't locate file for: -lfrtbegin
make: *** [Hmisc.so] Error 1
ERROR: compilation failed for package 'Hmisc'
** Removing
'/Library/Frameworks/R.framework/Versions/2.0.1/Resources/library/
Hmisc'
** Restoring previous
'/Library/Frameworks/R.framework/Versions/2.0.1/Resources/library/
Hmisc'

_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:   P.O.Box 400400  Charlottesville, VA 22904-4400
Parcels:Room 102Gilmer Hall
McCormick Road  Charlottesville, VA 22903
Office: B011+1-434-982-4729
Lab:B019+1-434-982-4751
Fax:+1-434-982-4766
WWW:http://www.people.virginia.edu/~mk9y/
[[alternative text/enriched version deleted]]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
--
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-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Problem installing Hmisc (more info)

2005-02-05 Thread Michael Kubovy
Frank Harrell suggested I re-post with information about the version of  
R

Heres's the information:
> >  version
>  _
> platform powerpc-apple-darwin6.8
> arch powerpc
> os   darwin6.8
> system   powerpc, darwin6.8
> status
> major2
> minor0.1
> year 2004
> month11
> day  15
> language R

Here's what happens when I try to install:
> >  install.packages("Hmisc")
> trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
> Content type `text/plain; charset=iso-8859-1' length 47565 bytes
> opened URL
> ==
> downloaded 46Kb
>
> trying URL `http://cran.r-project.org/src/contrib/Hmisc_3.0-1.tar.gz'
> Content type `application/x-tar' length 453567 bytes
> opened URL
> ==
> downloaded 442Kb
>
> Delete downloaded files (y/N)?
>
> The packages are in /tmp/Rtmp1911/Rinstdirfc4111
> Warning message:
> Installation of package Hmisc had non-zero exit status in:  
> install.packages("Hmisc")

Here's what the Console had to say:
> * Installing *source* package 'Hmisc' ...
> ** libs
> g77   -fno-common  -g -O2 -c cidxcn.f -o cidxcn.o
> g77   -fno-common  -g -O2 -c cidxcp.f -o cidxcp.o
> g77   -fno-common  -g -O2 -c hoeffd.f -o hoeffd.o
> g77   -fno-common  -g -O2 -c jacklins.f -o jacklins.o
> g77   -fno-common  -g -O2 -c largrec.f -o largrec.o
> gcc -no-cpp-precomp  
> -I/Library/Frameworks/R.framework/Resources/include   
> -I/usr/local/include   -fno-common  -g -O2 -c ranksort.c -o ranksort.o
> g77   -fno-common  -g -O2 -c rcorr.f -o rcorr.o
> g77   -fno-common  -g -O2 -c wclosest.f -o wclosest.o
> gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o  
> Hmisc.so cidxcn.o cidxcp.o hoeffd.o jacklins.o largrec.o ranksort.o  
> rcorr.o wclosest.o  -L/usr/local/lib  
> -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2  
> -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../.. -lfrtbegin  
> -lg2c -lSystem -lcc_dynamic -framework R
> ld: warning -L: directory name  
> (/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2) does not exist
> ld: warning -L: directory name  
> (/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../..) does not  
> exist
> ld: can't locate file for: -lfrtbegin
> make: *** [Hmisc.so] Error 1
> ERROR: compilation failed for package 'Hmisc'
> ** Removing  
> '/Library/Frameworks/R.framework/Versions/2.0.1/Resources/library/ 
> Hmisc'
> ** Restoring previous  
> '/Library/Frameworks/R.framework/Versions/2.0.1/Resources/library/ 
> Hmisc'


_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:   P.O.Box 400400  Charlottesville, VA 22904-4400
Parcels:Room 102Gilmer Hall
McCormick Road  Charlottesville, VA 22903
Office: B011+1-434-982-4729
Lab:B019+1-434-982-4751
Fax:+1-434-982-4766
WWW:http://www.people.virginia.edu/~mk9y/
[[alternative text/enriched version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] loess problems

2005-02-05 Thread Liaw, Andy
The problem is that 90% of your data sit on the boundary.  Loess is a
nearest neighbor smoother (using (100 x span) % of the data to estimate at
each point).  If you call loess() directly with span=2/3 (the default in
scatter.smooth), or something smaller than about 0.91, you'll see that it
has trouble.   

Strangely, if you set span=.8, scatter.smooth() will also complain, but not
at the default span...  (Re-generating the data yet again does trigger the
warnings, so seems like it does catches things some of the time.)

For your second example, I think loess becomes undefined when the span is
set too small (and 1/n is surely too small):  You are asking the algorithm
to take the nearest 1/n of the data to do the smooth.  You would think that
should just mean _the_ nearest data point, but the problem is:

> n <- 100
> 1 / n < 1
[1] TRUE

so you're asking the algoithm to take fewer than 1 data point to estimate at
each point.  The warnings you see for that example is pointing you in the
right direction.

Andy


> From: Jean Eid
> 
> I have a problem either understanding what loess is doing or 
> that loess
> has a problem itself.
> 
> As the x-axis variables become more concentrated on a 
> particular point,the
> estimated loess tends to zero. the examples below show what i am
> talking about,  why is that? my intution tells me
> that it should tend to the mean of the variable which is been 
> smoothed.
> 
> Here's a worked up example
> 
> x <- c(seq(0,100), rep(100,1000))
> y <- rnorm(length(x), mean=10, sd=2)
> scatter.smooth(x,y)
> 
> 
> 
> Although it does give warnings, I don't understand why it is 
> giving the
> estimate as zero.
> 
> 
> another example would be
> 
> x <- seq(0,100)
> y <- rnorm(length(x), mean=50, sd=2)
> scatter.smooth(x,y, span=1/length(x))
> 
> 
> shoudn't this give just the points at which the smoothing algorithm is
> applied?
> 
> 
> 
> thank you
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[Fwd: Re: [R] Problems compiling (configure) R on Ubuntu linux (debian)]

2005-02-05 Thread Ulises M. Alvarez
 Original Message 
Subject: Re: [R] Problems compiling (configure) R on Ubuntu linux (debian)
Date: Sat, 5 Feb 2005 12:47:42 -0600
From: Dirk Eddelbuettel <[EMAIL PROTECTED]>
To: Ulises M. Alvarez <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]>

Ulises,
Thanks -- but I am not the Ubuntu user who asked.  Could you resend this to
him, and the list?
On 5 February 2005 at 12:37, Ulises M. Alvarez wrote:
| Hello!
|
| I agree that the easiest way to get R in Ubuntu is with apt-get or with
| the GUI-based synaptic. Just make yourself sure that both the 'universe'
| and 'multiverse' repositories are available in your
| /etc/apt/sources.list, something like:
|
| ### /etc/apt/sources.list (partial view)
| deb http://archive.ubuntu.com/ubuntu warty universe multiverse
| deb-src http://archive.ubuntu.com/ubuntu warty universe multiverse
| ###
|
| Then, all you have to type is:
|
| sudo aptitude update
| sudo aptitude install r-base r-base-core r-base-latex r-cran-hmisc
Or apt-get, or wajig, or ...
| On the other hand, if you insist on compile R for your Ubuntu box, I'll
| recommend you to install (all in a long line):
|
| sudo aptitude install build-essential g77 libmagick++6-dev libpng3-dev
| libtiff-tools libtk-img libtiff4-dev tcl8.4 tcl8.4-dev tk8.4 tk8.4-dev
| a2ps libedit-dev libreadline4-dev tclreadline tetex-base tetex-bin
| tetex-extra
'apt-get build-dep r-base' is much easier, and possibly more complete :-)
That was a helpful post, though. Please send it to the list.
Cheers, Dirk
|
| And that's all I can remember now. Beware that this may take time,
| depending on your Internet connection.
|
| Let me know if you need more help.
|
|
| Dirk Eddelbuettel wrote:
| > On 5 February 2005 at 14:25, Peter Dalgaard wrote:
| > | =?windows-1250?Q?Ale=9A_=8Eiberna?= <[EMAIL PROTECTED]> 
writes:
| > | > I am new to Linux and I tried to compile R on my Ubuntu Warty 
linux. I
| >
| > There is really no need to do this, especially when you're new to 
Linux. The
| > command
| >
| >$ apt-get install r-base
| >
| > (or is graphical equivalent via aptitude et al) is your friend. You 
may have
| > to add Debian archives to the list of archives search when you do 
'apt-get
| > update'. I'm sure the Ubunto docs explain how to do that.
| >
| > Dirk, whose free Ubunto cdrom is still unused for lack of time
| >
|
| --
| U.M.A.
| http://sophie.fata.unam.mx/

--
Better to have an approximate answer to the right question than a precise
answer to the wrong question.  --  John Tukey as quoted by John Chambers
--
U.M.A.
http://sophie.fata.unam.mx/
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] loess problems

2005-02-05 Thread Jean Eid
I have a problem either understanding what loess is doing or that loess
has a problem itself.

As the x-axis variables become more concentrated on a particular point,the
estimated loess tends to zero. the examples below show what i am
talking about,  why is that? my intution tells me
that it should tend to the mean of the variable which is been smoothed.

Here's a worked up example

x <- c(seq(0,100), rep(100,1000))
y <- rnorm(length(x), mean=10, sd=2)
scatter.smooth(x,y)



Although it does give warnings, I don't understand why it is giving the
estimate as zero.


another example would be

x <- seq(0,100)
y <- rnorm(length(x), mean=50, sd=2)
scatter.smooth(x,y, span=1/length(x))


shoudn't this give just the points at which the smoothing algorithm is
applied?



thank you

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Compressed communication with DB using RMySQL?

2005-02-05 Thread David James
Uri wrote:
> Dear All,
> I have a setup where R pulls entries from a MySQL db server.  I wanted
> to know whether the R interface can pull encrypted / compressed data
> from MySQLD.  MySQL supports compressed communication on the server
> side, but I couldn't find any references to such options on the client
> (RMySQL) side.

Right, this is not properly documented (buried in ?mysqlNewConnection).
You can simply add the argumet client.flag = 32 to dbConnect(), e.g.,

   con <- dbConnect(MySQL(), ..., client.flag=32)

The number 32 comes from the mysql_com.h version 4.1.17 header file
#define CLIENT_COMPRESS 32  /* Can use compression protocol */

I'd be curious to know whether you find compressed connections 
significantly faster over raw connections.

Hope this helps,

--
David

> 
> Best,
> Uri Hasson.
> ---
> Uri Hasson.
> Brain Research Imaging Center
> The University of Chicago.
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Problem installing Hmisc

2005-02-05 Thread Thomas Lumley
On Sat, 5 Feb 2005, Michael Kubovy wrote:
What am I doing wrong?
You can look at the console log (eg start Console.app in 
/Applications/Utilities) to see what the problem is, but the fact that 
Hmisc is not available as a binary package probably means that it does not 
compile for the Mac (at least without some modification)

-thomas
>  install.packages("Hmisc")
trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
Content type `text/plain; charset=iso-8859-1' length 47565 bytes
opened URL
==
downloaded 46Kb
trying URL `http://cran.r-project.org/src/contrib/Hmisc_3.0-1.tar.gz'
Content type `application/x-tar' length 453567 bytes
opened URL
==
downloaded 442Kb
Delete downloaded files (y/N)?
The packages are in /tmp/Rtmp1911/Rinstdir77a4044d
Warning message:
Installation of package Hmisc had non-zero exit status in:
install.packages("Hmisc")
_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:   P.O.Box 400400  Charlottesville, VA 22904-4400
Parcels:Room 102Gilmer Hall
McCormick Road  Charlottesville, VA 22903
Office: B011+1-434-982-4729
Lab:B019+1-434-982-4751
Fax:+1-434-982-4766
WWW:http://www.people.virginia.edu/~mk9y/
[[alternative text/enriched version deleted]]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Thomas Lumley   Assoc. Professor, Biostatistics
[EMAIL PROTECTED]   University of Washington, Seattle
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to access results of survival analysis

2005-02-05 Thread Uwe Ligges
Heinz Tuechler wrote:
At 15:19 05.02.2005 +0100, Uwe Ligges wrote:
Heinz Tuechler wrote:
Hello,
it seems that the main results of survival analysis with package survival
are shown only as side effects of the print method.
If I compute e.g. a Kaplan-Meier estimate by 


km.survdur<-survfit(s.survdur) 
then I can simply print the results by 


km.survdur
Call: survfit(formula = s.survdur)
 n  events  median 0.95LCL 0.95UCL 
 100.058.046.841.079.3 

Is there a simple method to access these results, e.g. if I want to print
only the median with the confidence limits?

...
No, the print methods do not return those values.
But you can copy code for calculation of the required values from those 
print methods into your own functions...

Uwe Ligges

Thank you for your answer. I assume, you suggest to use
capture.output(print(...)). 
No, I suggested to copy the code from survival:::print.survfit and Co. 
that calculates the values you are looking for...

Uwe
> Without your response I would have believed
that I had missed an important possibility of R.
Regarding the Cox-Model Ales Ziberna gave me a useful hint to use summary()
which returns a list.
Thanks to both of you,
Heinz Tüchler
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Compressed communication with DB using RMySQL?

2005-02-05 Thread Uri
Dear All,
I have a setup where R pulls entries from a MySQL db server.  I wanted
to know whether the R interface can pull encrypted / compressed data
from MySQLD.  MySQL supports compressed communication on the server
side, but I couldn't find any references to such options on the client
(RMySQL) side.

Best,
Uri Hasson.
---
Uri Hasson.
Brain Research Imaging Center
The University of Chicago.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to access results of survival analysis

2005-02-05 Thread Heinz Tuechler
At 15:19 05.02.2005 +0100, Uwe Ligges wrote:
>Heinz Tuechler wrote:
>> Hello,
>> 
>> it seems that the main results of survival analysis with package survival
>> are shown only as side effects of the print method.
>> 
>> If I compute e.g. a Kaplan-Meier estimate by 
>> 
>>>km.survdur<-survfit(s.survdur) 
>> 
>> then I can simply print the results by 
>> 
>>>km.survdur
>> 
>> Call: survfit(formula = s.survdur)
>> 
>>   n  events  median 0.95LCL 0.95UCL 
>>   100.058.046.841.079.3 
>> 
>> Is there a simple method to access these results, e.g. if I want to print
>> only the median with the confidence limits?

...
>
>No, the print methods do not return those values.
>But you can copy code for calculation of the required values from those 
>print methods into your own functions...
>
>Uwe Ligges
>
>
Thank you for your answer. I assume, you suggest to use
capture.output(print(...)). Without your response I would have believed
that I had missed an important possibility of R.

Regarding the Cox-Model Ales Ziberna gave me a useful hint to use summary()
which returns a list.

Thanks to both of you,

Heinz Tüchler

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] how to make an empty screen

2005-02-05 Thread Søren Merser
Hi

I want to plot control charts for several events grouped by employees.
As every employees doesn't encounter every event, a variable number of
control charts is produced in turn.
Now what I need is a way to get a new empty screen when the printout for one
employee has finished as the title lines is somhow mixed between the
changing of employees

The screen setup: 
par(mfrow=c(4,4))
And I make the title like this:
title(main=event, outer=T)

Regards soren

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to access results of survival analysis

2005-02-05 Thread Heinz Tuechler
Hello Ales,

thank you for your hint regarding names(summary(fit)). Summary(fit) is a
list containig all important results of the Cox-model.
So it helps a lot!
Regarding the results of a Kaplan-Meier estimate summary does not help,
because it does not contain the main results.

Thanks again,
Heinz Tüchler

ps. If I understood it right, you answered only to me and not to the list.
So I assumed that you prefer not to put your answer on the list and
therefore I answer to you off-list.

At 09:24 05.02.2005 +0100, Ales Ziberna wrote:
>Hi!
>
>I don't now how to reach the median directly. However I can help you whit 
>cox-PH coefficients.
>
>if fit is the resoult of the coxph, then
>
>fit$coefficients should give you the coefficients. To see whatother things 
>you can acces in similar way, see
>names(fit)
>or
>names(summary(fit)).
>
>I hope this helps at least a little!
>
>Ales Ziberna
>
>
>- Original Message - 
>From: "Heinz Tuechler" <[EMAIL PROTECTED]>
>To: 
>Sent: Friday, February 04, 2005 11:17 PM
>Subject: [R] How to access results of survival analysis
>
>
>Hello,
>
>it seems that the main results of survival analysis with package survival
>are shown only as side effects of the print method.
>
>If I compute e.g. a Kaplan-Meier estimate by
>> km.survdur<-survfit(s.survdur)
>then I can simply print the results by
>> km.survdur
>Call: survfit(formula = s.survdur)
>
>  n  events  median 0.95LCL 0.95UCL
>  100.058.046.841.079.3
>
>Is there a simple method to access these results, e.g. if I want to print
>only the median with the confidence limits?
>Regarding the results of a Cox-PH-model I face the same situation. The
>printed results are:
>> cx.survdur.ipss_mds.sex
>Call:
>coxph(formula = s.survdur ~ x1 + x2, method = "efron")
>
>   coef exp(coef) se(coef) z  p
>x1   0.6424  1.900.206 3.123 0.0018
>x2.L 0.0616  1.060.263 0.234 0.8100
>
>Likelihood ratio test=9.56  on 2 df, p=0.0084  n=58 (42 observations
>deleted due to missing)
>
>Is there a simple method to copy e.g. the coefficients and p-values in a
>new object?
>
>I am working with:
>R : Copyright 2004, The R Foundation for Statistical Computing
>Version 2.0.1  (2004-11-15), ISBN 3-900051-07-0
>Survival package version: survival_2.16
>Operating System: Windows 98SE
>
>Thanks,
>Heinz Tüchler
>
>__
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! 
>http://www.R-project.org/posting-guide.html
>
>
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Problems compiling (configure) R on Ubuntu linux (debian)

2005-02-05 Thread Dirk Eddelbuettel

On 5 February 2005 at 14:25, Peter Dalgaard wrote:
| =?windows-1250?Q?Ale=9A_=8Eiberna?= <[EMAIL PROTECTED]> writes:
| > I am new to Linux and I tried to compile R on my Ubuntu Warty linux. I 

There is really no need to do this, especially when you're new to Linux. The
command

   $ apt-get install r-base

(or is graphical equivalent via aptitude et al) is your friend. You may have
to add Debian archives to the list of archives search when you do 'apt-get
update'. I'm sure the Ubunto docs explain how to do that.

Dirk, whose free Ubunto cdrom is still unused for lack of time

-- 
Better to have an approximate answer to the right question than a precise 
answer to the wrong question.  --  John Tukey as quoted by John Chambers

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Rép : [R] 2 small problems: integer division and the nature of NA

2005-02-05 Thread Denis Chabot
Thanks to the many R users who convinced me that the sum of NAs should 
be zero and gave me a solution if I did not want it to be zero.

Thank you also for the explanations of rounding errors with floating 
point arithmetics. I did not expect it. This small error was a real 
problem for me as I was trying to find a way to recode numeric values 
into intervals. Because I wanted to retain numeric values as a result, 
I tried not to use cut or cut2. Hence to convert a range of 
temperatures into 0.2 degree intervals I had written:

(lets first make a fake temperature variable k for testing)
k <- seq(-5,5,0.1)
k1 <- ifelse(k<0,-0.2*(abs(k) %/% 0.2) - 0.1, 0.2 *(k %/% 0.2) + 0.1)
Note that this works well to quickly recode a numeric variable that 
only takes integer values. But it produces the problem that prompted my 
call for help when there are decimals: some values end up in a 
different class than what you'd expect.

Considering your answers, I found 3 solutions:
k2 <- ifelse(k<0,-0.2*(abs(round(10*k)) %/% 2) - 0.1, 0.2 *(round(10*k) 
%/% 2) + 0.1)

k3 <- (-0.1+min(k)) + 0.2 * as.numeric(cut(k, 
seq(min(k),max(k)+0.2,0.2), right=F, labels=F))

k4 <- cut2(k, seq(min(k), max(k)+0.2, 0.2), levels.mean=T)
k5 <- as.numeric(levels(k7))[k7]
I could "round" to 1 decimal to be even more exact but this is good 
enough. If it can be more elegant, please let me know!

Denis
Subject: [R] 2 small problems: integer division and the nature of NA
Hi,
I'm wondering why
48 %/% 2 gives 24
but
4.8 %/% 0.2 gives 23...
I'm not trying to round up here, but to find out how many times
something fits into something else, and the answer should have been the
same for both examples, no?
On a different topic, I like the behavior of NAs better in R than in
SAS (at least they are not considered the smallest value for a
variable), but at the same time I am surprised that the sum of NAs is 0
instead of NA.
The sum of a vector having at least one NA but also valid data gives NA
if we do not specify na.rm=T. But with na.rm=T, we are telling sum to
give the sum of valid data, ignoring NAs that do not tell us anything
about the value of a variable. I found out while getting the sum of
small subsets of my data (such as when subsetting by several
variables), sometimes a "cell" only contained NAs for my response
variable. I would have expected the sum to be NA in such cases, as I do
not have a single data point telling me the value of my response here.
But R tells me the sum was zero in that cell! Was this behavior
considered "desirable" when sum was built? If not, any hope it will be
fixed?
Sincerely,
Denis Chabot
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Problem installing Hmisc

2005-02-05 Thread Uwe Ligges
Michael Kubovy wrote:
What am I doing wrong?
 >  install.packages("Hmisc")
trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
Content type `text/plain; charset=iso-8859-1' length 47565 bytes
opened URL
==
downloaded 46Kb
trying URL `http://cran.r-project.org/src/contrib/Hmisc_3.0-1.tar.gz'
Content type `application/x-tar' length 453567 bytes
opened URL
==
downloaded 442Kb
No further messages here? E.g. something like
* Installing *source* package 'Hmisc' ...
** libs
?
Have you installed other packages with/without success before?
What happens when trying to install from the command line using
  R CMD INSTALL
?
Uwe Ligges

Delete downloaded files (y/N)?
The packages are in /tmp/Rtmp1911/Rinstdir77a4044d
Warning message:
Installation of package Hmisc had non-zero exit status in: 
install.packages("Hmisc")
_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: 	P.O.Box 400400	Charlottesville, VA 22904-4400
Parcels:	Room 102		Gilmer Hall
		McCormick Road	Charlottesville, VA 22903
Office:	B011	+1-434-982-4729
Lab:		B019	+1-434-982-4751
Fax:		+1-434-982-4766
WWW:	http://www.people.virginia.edu/~mk9y/
	[[alternative text/enriched version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to access results of survival analysis

2005-02-05 Thread Uwe Ligges
Heinz Tuechler wrote:
Hello,
it seems that the main results of survival analysis with package survival
are shown only as side effects of the print method.
If I compute e.g. a Kaplan-Meier estimate by 

km.survdur<-survfit(s.survdur) 
then I can simply print the results by 

km.survdur
Call: survfit(formula = s.survdur)
  n  events  median 0.95LCL 0.95UCL 
  100.058.046.841.079.3 

Is there a simple method to access these results, e.g. if I want to print
only the median with the confidence limits?
Regarding the results of a Cox-PH-model I face the same situation. The
printed results are:
cx.survdur.ipss_mds.sex
Call:
coxph(formula = s.survdur ~ x1 + x2, method = "efron")
   coef exp(coef) se(coef) z  p
x1   0.6424  1.900.206 3.123 0.0018
x2.L 0.0616  1.060.263 0.234 0.8100
Likelihood ratio test=9.56  on 2 df, p=0.0084  n=58 (42 observations
deleted due to missing)
Is there a simple method to copy e.g. the coefficients and p-values in a
new object?
I am working with:
R : Copyright 2004, The R Foundation for Statistical Computing
Version 2.0.1  (2004-11-15), ISBN 3-900051-07-0
Survival package version: survival_2.16
Operating System: Windows 98SE
Thanks,
Heinz Tüchler
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
No, the print methods do not return those values.
But you can copy code for calculation of the required values from those 
print methods into your own functions...

Uwe Ligges
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Problems compiling (configure) R on Ubuntu linux (debian)

2005-02-05 Thread Peter Dalgaard
=?windows-1250?Q?Ale=9A_=8Eiberna?= <[EMAIL PROTECTED]> writes:

> Hello!
> 
> I would first like to appologice if this question does not fit on this 
> mailing-list.
> 
> I am new to Linux and I tried to compile R on my Ubuntu Warty linux. I 
> followed the instructions in "R Installation and Administration" manual. It 
> seams that there was a problem with "configure", since when running "make" 
> afterward gave me this reply:
> make: *** No targets specified and no makefile found.  Stop.

Presumably configure told you something before that?

> I have copied the content of the "config.log" at the end of the file. If 
> someone would give me some instructions on how to read this file, I would be 
> very grateful.
> 
> Thank you in advance!
> Ales Ziberna

So you thought that sending 2800 lines  to 2000+ people probably
wouldn't bother anyone?

You seem to be lacking a Fortran compiler as configure is picking up
"fc" (which is bash's "fix command"), but we could have found that out
based on more concentrated output than the entire config.log.

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Rare Cases and SOM

2005-02-05 Thread Gabor Grothendieck
Manuel Gutierrez  yahoo.es> writes:

: 
: I am trying to understand how the SOM algorithm works
: using library(class) SOM function.
: I have a 1000*10 matrix and I want to be able to
: summarize the different types of 10-element vectors.
: In my real world case it is likely that most of the
: 1000 values are of one kind the rest of other (this is
: an oversimplification).
: Say for example:
: 
: InputA<-matrix(cos(1:10),nrow=900,ncol=10,byrow=TRUE)
: InputB<-matrix(sin(5:14),nrow=100,ncol=10,byrow=TRUE)
: Input<-rbind(InputA,InputB)
: 
: I though that a small grid of 3*3 would be enough to
: extract the patterns in such simple matrix :
: GridWidth<-3
: GridLength<-3
: gr <- somgrid(xdim=GridWidth,ydim=GridLength,topo =
: "hexagonal")
: test.som <- SOM(Input, gr)
: par(mfrow=c(GridLength,GridWidth))
: for(i in 1:(GridWidth*GridLength))
: plot(test.som$codes[i,],type="l")
: 
: Only when I use a larger grid (say for example 7*3 ) I
: get some of the representatives for the sin pattern.
: This must have something to do with the initialization
: of the grid, as the sin is so rare it is unlikely that
: I get it as a reference vector. Afterwards, because
: the selection for the training is also random it is
: also unlikely they are picked.
: I've been trying to modify some of the other
: parameters for the SOM also, but I would appreciatte
: some input to keep me going until I receive the
: reference books from my bookstore.
: 
: Are my suspictions right?
: Should I be using the SOM for my study or should I
: look somewhere else?
: NOTE: I have no prior knowledge of whether the
: datasets I want to analyse will have rare cases or not
: or where they will be located.

I don't have a direct answer to your question as I have not
used that package but I have used randomForest and it does have 
stratified sampling facitilities so that you can be sure that a rare case
is represented.  Check out the sampsize= argument.  Also there
is an article in RNews on randomForest and search this list where
you can find some relevant comments by the author of randomForest.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Problem installing Hmisc

2005-02-05 Thread Michael Kubovy
What am I doing wrong?

 >  install.packages("Hmisc")
trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
Content type `text/plain; charset=iso-8859-1' length 47565 bytes
opened URL
==
downloaded 46Kb

trying URL `http://cran.r-project.org/src/contrib/Hmisc_3.0-1.tar.gz'
Content type `application/x-tar' length 453567 bytes
opened URL
==
downloaded 442Kb

Delete downloaded files (y/N)?

The packages are in /tmp/Rtmp1911/Rinstdir77a4044d
Warning message:
Installation of package Hmisc had non-zero exit status in: 
install.packages("Hmisc")
_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:   P.O.Box 400400  Charlottesville, VA 22904-4400
Parcels:Room 102Gilmer Hall
McCormick Road  Charlottesville, VA 22903
Office: B011+1-434-982-4729
Lab:B019+1-434-982-4751
Fax:+1-434-982-4766
WWW:http://www.people.virginia.edu/~mk9y/
[[alternative text/enriched version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Installing R packages in windows

2005-02-05 Thread Uwe Ligges
Liaw, Andy wrote:
A half-way decent ftp client would allow you to get all files in a
directory, so that ought to be quite easy.
... or wget ... or in R:
download.packages(CRAN.packages()[,1], destdir = ..)
Uwe Ligges

Andy

From: Vikas Rawal
Thank you. That is useful. But is it possible to download all 
the packages in one go, or would one have download each one by one?

Vikas
-Original Message-
From: Uwe Ligges <[EMAIL PROTECTED]>
To: Vikas Rawal <[EMAIL PROTECTED]>
Date: Fri, 04 Feb 2005 13:55:42 +0100
Subject: Re: [R] Installing R packages in windows
Vikas Rawal wrote:

I need to install a selected set of packages on a number of 
machines (in a computer lab). Some of these machines are not 
connected to internet. Is it possible to download all the 
packages and make a kind of repository on a CD, and then 
install.packages from the CD?

Yes, just download the packages and install.packages with 
CRAN=NULL ...

Instead, you might want to mount the installed packages from 
a network 
volume instead, adding a second library path for R. So you 
only need to 
install stuff once.

Uwe Ligges


Vikas
==
This Mail was Scanned for Virus and found Virus free
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html
__
R-help@stat.math.ethz.ch mailing list
https://stat.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 attachment...{{dropped}}
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Std Err on Concentration measures

2005-02-05 Thread Tim F Liao
David Giles has a paper on calculating standard errors for the
Gini: http://web.uvic.ca/econ/ewp0202.pdf

Tim

 Original message 
>Date: Sat, 5 Feb 2005 11:43:02 +0100
>From: Angelo Secchi <[EMAIL PROTECTED]>  
>Subject: [R] Std Err on Concentration measures  
>To: r-help@stat.math.ethz.ch
>
>
>Hi,
>I'm using the ineq package to calculate some concentration
measures (Gini, Herfindal, ...) and I was wondering if there's
around also a function to calculate standard error on these
measures. If not, is anybody aware of where I can find a
reference on this point?
>Thanks.
>
>-- 
>
> Angelo Secchi PGP Key ID:EA280337
>
>__
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Std Err on Concentration measures

2005-02-05 Thread Angelo Secchi

Hi,
I'm using the ineq package to calculate some concentration measures (Gini, 
Herfindal, ...) and I was wondering if there's around also a function to 
calculate standard error on these measures. If not, is anybody aware of where I 
can find a reference on this point?
Thanks.

-- 

 Angelo Secchi PGP Key ID:EA280337

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] arrow head styles?

2005-02-05 Thread Martin Maechler
> "IvoW" ==   <[EMAIL PROTECTED]>
> on Fri, 04 Feb 2005 12:33:52 -0800 writes:

IvoW> dear R wizards: is it possible to specify different
IvoW> arrow head styles?  E.g., a solid arrow head?  Or a
IvoW> bent arrow head?  Or a longer or shorter arrow head?
IvoW> (perhaps through an add in?)  I guess I could write
IvoW> this myself, but since arrows is built-in, I was
IvoW> hoping it had some flexibility hidden in it that I did
IvoW> not see in "?arrows".

The are several "extensions" to the arrows() function around.

package 'sfsmisc'  has  p.arrows()
package 'IDPmisc'  has  Arrows()

Did you try to search for "arrows" on Jonathan Baron's search
site  http://search.R-project.org/ ?

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Internationalization and localization of R

2005-02-05 Thread Prof Brian Ripley
This pre-announcement is being sent for information to both R-help and 
BioC.  Please use [EMAIL PROTECTED] for any follow-up discussion.

---
We are about at the end of a several-week process of adding support for
non-Latin character sets and non-Western-European languages to R.
- For Linux users, R works in the UTF-8 locales that are rapidly becoming
  the standard in the latest distributions: for example if in Fedora Core
  3 I select English (United Kingdom) I get locale en_GB.utf8.  This is
  also true of those commercial Unixes which support such locales.
- For Linux/Unix users, R works in many non-English locales with other
  encodings such as EUC-JP.  The only one that we are having problems with
  is vi_VN.tcvn (but the Vietnamese UTF-8 locale appears to work).
- For Windows users, R works in the double-byte `East Asian' locales as
  well as many others, if support is selected at installation time.
  (See the current rw-FAQ for more discussion of this: this is supported
  in the current automated builds of r-devel on CRAN.)
- There are built-in facilities to convert between encodings, so that e.g.
  Japanese in SHIFT-JIS can be read by R running under UTF-8 or EUC-JP.
- There are mechanisms to translate both C and R error messages from both
  base R and for packages, and also the menus etc of the Windows and
  MacOS X GUIs.
The purpose of this pre-announcement is to alert developers that these 
changes will be coming in 2.1.0 in a couple of months.

- Package writers who would like to translate messages in their packages,
  or to prepare their packages for translation by others should consult
  http://developer.r-project.org/210update.txt
  and the latest version of `Writing R Extensions' in the R-devel sources.
  All the standard packages and a few of the recommended ones have been
  prepared and updates will be appearing on CRAN shortly.
- People might like to start organizing translation teams for their own
  languages, and early experience from such a team would be helpful in
  polishing the instructions and mechanisms.  There is a document for
  translators at
  http://developer.r-project.org/Translations.html
  If translations are available by early April they can be shipped with
  2.1.0 (although there are planned to be mechanisms to add them to an R
  installation).
- We will be looking for testers in the alpha/beta period in about a
  month's time, and would-be users of R in unusual languages (e.g.
  Vietnamese) would be especially helpful as testers.  This is
  particularly important for Windows 95/98/ME to which we only have
  very limited access, to English versions.
---
--
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-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] genetic algorithm

2005-02-05 Thread Philippe Grosjean
After a little search, I found on CRAN:
- gafit: genetic algorithm for curve fitting,
- rgenout: R version of genetic optimization using derivatives
- subselect: Selecting variable subsets, with function genetic(): 
genetic algorithm searching for an optimal k-variable subset

I don't know if it fits your needs.
Best,
Philippe
..<°}))><
 ) ) ) ) )
( ( ( ( (Prof. Philippe Grosjean
 ) ) ) ) )
( ( ( ( (Numerical Ecology of Aquatic Systems
 ) ) ) ) )   Mons-Hainaut University, Pentagone (3D08)
( ( ( ( (Academie Universitaire Wallonie-Bruxelles
 ) ) ) ) )   8, av du Champ de Mars, 7000 Mons, Belgium
( ( ( ( (
 ) ) ) ) )   phone: + 32.65.37.34.97, fax: + 32.65.37.30.54
( ( ( ( (email: [EMAIL PROTECTED]
 ) ) ) ) )
( ( ( ( (web:   http://www.umh.ac.be/~econum
 ) ) ) ) )  http://www.sciviews.org
( ( ( ( (
..
WeiWei Shi wrote:
Hi, 
I am doing some research on feature selection for classfication
problem using genetic algorithm in a wrapper approach. I am wondering
if there is some package which is already built for this purpose. I
was advised before about dprep package but I don't think it used GA
there (if I am wrong, please correct me!)

Thanks,
Ed
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html