[R] Revert a factor to its numeric values

2004-08-18 Thread Göran Broström
I'm trying a recommendation on the help page for 'factor': x - c(1, 2, 1, 2) x - factor(x, labels = c(one, two)) x [1] one two one two Levels: one two as.numeric(levels(x))[x] [1] NA NA NA NA Warning message: NAs introduced by coercion Also, as.numeric(as.character(x)) [1] NA NA NA NA

[R] (no subject)

2004-08-18 Thread Wildi Marc, wia
Hi Does anybody know from an R-package devoted to sample selection problems (Heckman's lambda, Lewbel, ...)? Thanks and best regards Marc Wildi __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Revert a factor to its numeric values

2004-08-18 Thread Prof Brian Ripley
On Wed, 18 Aug 2004, Göran Broström wrote: I'm trying a recommendation on the help page for 'factor': x - c(1, 2, 1, 2) x - factor(x, labels = c(one, two)) x [1] one two one two Levels: one two as.numeric(levels(x))[x] [1] NA NA NA NA Warning message: NAs introduced by coercion

Re: [R] Revert a factor to its numeric values

2004-08-18 Thread Göran Broström
On Wed, Aug 18, 2004 at 09:30:50AM +0100, Prof Brian Ripley wrote: On Wed, 18 Aug 2004, Göran Broström wrote: I'm trying a recommendation on the help page for 'factor': x - c(1, 2, 1, 2) x - factor(x, labels = c(one, two)) x [1] one two one two Levels: one two

Re: [R] Revert a factor to its numeric values

2004-08-18 Thread Prof Brian Ripley
On Wed, 18 Aug 2004, Göran Broström wrote: On Wed, Aug 18, 2004 at 09:30:50AM +0100, Prof Brian Ripley wrote: On Wed, 18 Aug 2004, Göran Broström wrote: I'm trying a recommendation on the help page for 'factor': x - c(1, 2, 1, 2) x - factor(x, labels = c(one, two)) x

Re: [R] logistic -normal model

2004-08-18 Thread Spencer Graves
1. Have you also tried glmmPQL in library(MASS)? It is supposed to do the same thing. I had better luck with GLMM, but you might try glmmPQL if you haven't already. 2. PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html;. It may help you find answers

Re: [R] Re: Thanks Frank, setting graph parameters, and why social scientists don't use R

2004-08-18 Thread John Maindonald
There are answers that could and should be applied in specific situations. At least in academia and in substantial research teams, statisticians ought to have a prominent part in many of the research teams. Senior statisticians should have a prominent role in deciding the teams to which this

Re: [R] Re: Thanks Frank, setting graph parameters, and why socialscientists don't use R

2004-08-18 Thread David Foreman
Medicine in the UK uses (or used, it's changing) the 'apprenticeship model' which in my case meant my own datasets (providing the motivation) the programme and its supporting written documentation (SPSS manuals double as quite good statistical textbooks, so I could link the concepts to the

Re: [R] function(...) {}

2004-08-18 Thread Gabor Grothendieck
Luis Rideau Cruz Luisr at frs.fo writes: R-help Assignments within functions are local and temporary,right?(function 1) If arguments to another function (function 2) are objects created in function 1 and need to call function 2,,,then it won't work,Am i right? I have nested the

Re: [R] all.equal and names?

2004-08-18 Thread Duncan Murdoch
On Wed, 18 Aug 2004 10:27:49 -0400, Spencer Graves [EMAIL PROTECTED] wrote : How can I compare two objects for structure, names, values, etc.? With R 1.9.1 under Windows 2000, the obvious choice all.equal ignores names and compares only values: all.equal(1, c(a=1)) [1] TRUE

[R] downloading the R program

2004-08-18 Thread Joanne Butler
I am trying to download the R program, but am having trouble. I have read through the instructions, but do not seem to be able to do it properly. Can you tell me the step-by-step instructions? Joanne L. Butler, Post-doctoral Fellow Equity and Technology Research Project c/o Department of

[R] Xtable method for coxph, bug?

2004-08-18 Thread Hanke, Alex
Hi There is a xtable method for coxph. It bombs, however, when applied to my coxph object. It cannot find 'nse' which I think is sqrt(diag(coxph.object$naive.var)). Adding 'nse' to the coxph object cures the problem. Is this a bug in xtable.coxph? There is no xtable method for summary.coxph.

Re: [R] downloading the R program

2004-08-18 Thread Uwe Ligges
Joanne Butler wrote: I am trying to download the R program, but am having trouble. I have read through the instructions, but do not seem to be able to do it properly. Can you tell me the step-by-step instructions? Either look at http://cran.r-project.org/ or read the R Installation and

Re: [R] downloading the R program

2004-08-18 Thread Adaikalavan Ramasamy
What difficulties, instruction and operating system are you talking about ? 1. Go to www.r-project.org 2. Click on CRAN under downloads 3. Choose a mirror 4. Go to pre-compiled binaries and select your OS 5. If windows, choose base and right click and save on the exe file On Wed, 2004-08-18

Re: [R] downloading the R program

2004-08-18 Thread partha_bagchi
I am not sure which platform you are on. However, if you go to CRAN (cran.us.r-project.org/) you should be able to get step-by-step instruction. Please read the posting guide. It can answer a lot of questions for you. HTH, Partha Joanne Butler [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED]

Re: [R] table and getting rownames

2004-08-18 Thread Søren Merser
exactly what i needed thanks a lot soren - Original Message - From: Peter Dalgaard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: R-help [EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 2:35 PM Subject: Re: [R] table and getting rownames [EMAIL PROTECTED] writes: hi there say that

Re: [R] survdiff

2004-08-18 Thread Thomas Lumley
On Tue, 17 Aug 2004, Peter Dalgaard wrote: You really need to read a theory book for this, but here's the basic idea: V is the theoretical variance of O-E for the first group. If O-E is approximately normally distributed, as it will be in large samples, then (O-E)^2/V will be approximately

Re: [R] Revert a factor to its numeric values

2004-08-18 Thread Thomas Lumley
On Wed, 18 Aug 2004, Göran Broström wrote: I'm trying a recommendation on the help page for 'factor': x - c(1, 2, 1, 2) x - factor(x, labels = c(one, two)) x [1] one two one two Levels: one two as.numeric(levels(x))[x] [1] NA NA NA NA Warning message: NAs introduced by coercion

Re: [R] all.equal and names?

2004-08-18 Thread Spencer Graves
Hi, Duncan: Thanks much. I think I remember reading about both all.equal and identical in Venables and Ripley (2002) MASS. Unfortunately, I don't have MASS handy now, and I could not find it otherwise, so I asked. What needs to happen to upgrade the all.equal documentation to

Re: [R] all.equal and names?

2004-08-18 Thread Marc Schwartz
It is in the Description now (at least for 1.9.1 patched): all.equal(x,y) is a utility to compare R objects x and y testing near equality. If they are different, comparison is still made to some extent, and a report of the differences is returned. Don't use all.equal directly in if

[R] Memory Problems in R

2004-08-18 Thread Scott Gilpin
Hello everyone - I have a couple of questions about memory management of large objects. Thanks in advance for your response. I'm running R version 1.9.1 on solaris 8, compiled as a 32 bit app. My system has 12.0 GB of memory, with usually ~ 11GB free. I checked system limits using ulimit, and

Re: [R] Memory Problems in R

2004-08-18 Thread Roger D. Peng
There is a limit on how long a single vector can be, and I think it's 2GB (even on 64-bit platforms). Not sure on how the gc trigger is set -roger Scott Gilpin wrote: Hello everyone - I have a couple of questions about memory management of large objects. Thanks in advance for your response.

Re: [R] Memory Problems in R

2004-08-18 Thread Prof Brian Ripley
On Wed, 18 Aug 2004, Roger D. Peng wrote: There is a limit on how long a single vector can be, and I think it's 2GB (even on 64-bit platforms). Not sure on how the gc trigger is set There is a limit of R_SIZE_T_MAX bytes, but that is defined as ULONG_MAX which should be 4GB-1 on a 32-bit

[R] labeled break statements in R?

2004-08-18 Thread Roger Levy
Hi, Are there labeled break statements in R? i.e., something along the lines of TOPLOOP: for(i in 1:m) { for(j in 1:n) { ... if(condition) { break TOPLOOP } } } Thanks, Roger __ [EMAIL PROTECTED] mailing list

RE: [R] Does anybody runs R on the hp ML 370 or ML570 servers?

2004-08-18 Thread Liaw, Andy
From: Prof Brian Ripley On Mon, 16 Aug 2004, Li, Aiguo (NIH/NCI) wrote: I am trying to buy a hp server to run R and to complete some other tasks with limited bugets. The r-project.org site recommended that R will run on hppa-hp-hpux. I don't think they are _recommended_

[R] calling R from Perl

2004-08-18 Thread Clive Glover
Hello, I am trying to call R from Perl running on Windows 2000. I have looked through the previous posts regarding running R from Perl and all have referred to the RSPerl package at Omegahat. Unfortunately the documentation for this package specifically states that it only works in Unix at the

Re: [R] labeled break statements in R?

2004-08-18 Thread Prof Brian Ripley
On 18 Aug 2004, Roger Levy wrote: Are there labeled break statements in R? i.e., something along the lines of TOPLOOP: for(i in 1:m) { for(j in 1:n) { ... if(condition) { break TOPLOOP } } } No, but if you find yourself using nested for loops it is very likely

Re: [R]...Why social scientists don't use R

2004-08-18 Thread Cliff Lunneborg
Berton Gunter has written in part: A few comments: First, your remarks are interesting and, I would say, mainly well founded. However, I think they are in many respects irrelevant, although they do point to the much bigger underlying issue, which Roger Peng also hinted at in his reply. I

Re: [R]...Why social scientists don't use R

2004-08-18 Thread Duncan Murdoch
On Wed, 18 Aug 2004 12:16:21 -0700, Cliff Lunneborg [EMAIL PROTECTED] wrote : Years ago StatSci Europe published a handy little Complete Listing of S-PLUS Functions, categorized in some way. I found it useful. Something similar for R would not go amiss. I know, it would want to be 420 pages

Re: [R] calling R from Perl

2004-08-18 Thread Sean Davis
Clive, Have a look at Statistics::R (http://search.cpan.org/~gmpassos/Statistics-R-0.02). I'm not sure if it works well with Windows, but it is the only other option that I know of to work directly with the R-interpreter. However, you can always create a batch file and write it to a file and

Re: [R]...Why social scientists don't use R

2004-08-18 Thread Jonathan Baron
On 08/18/04 12:16, Cliff Lunneborg wrote: My experience has been that the real challenge is not understanding the documentation, but finding it. Once I know the names of one or more candidate functions I am happily on my way. One of the delights of reading r-help is that one keeps discovering

Re: [R]...Why social scientists don't use R

2004-08-18 Thread Prof Brian Ripley
On Wed, 18 Aug 2004, Cliff Lunneborg wrote: Berton Gunter has written in part: A few comments: First, your remarks are interesting and, I would say, mainly well founded. However, I think they are in many respects irrelevant, although they do point to the much bigger underlying issue,

Re: [R] Incremental operator

2004-08-18 Thread S Peri
Hi group, I am trying to get the LocusID numbers from my affy expression matrix. I instantiated rownames function to get an object with all the probe IDs. where.affy.at - rownames(gliexp) Now I wanted to get another object with the LocusIDs in it like the following. However, I get the

[R] paired t-test vs pairwise t-test

2004-08-18 Thread Jack Tanner
What's the difference between t.test(x, y) and pairwise.t.test()? Is it just that the former takes two vectors, whereas the latter takes a vector and a factor? __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Incremental operator

2004-08-18 Thread Prof Brian Ripley
What is gliexp? str(gliexp) would have been useful information to give. Assuming it is an R matrix, the rownames are _names_, not numbers. Surely in all languages with for loops it is bad idea to manipulate the loop index inside the loop, but you definitely cannot do arithmetic on character

Re: [R] paired t-test vs pairwise t-test

2004-08-18 Thread Peter Dalgaard
Jack Tanner [EMAIL PROTECTED] writes: What's the difference between t.test(x, y) and pairwise.t.test()? Is it just that the former takes two vectors, whereas the latter takes a vector and a factor? No. You might try reading the help pages and run the examples there... -- O__

[R] distance to cluster center

2004-08-18 Thread Moises Hassan
Is there a way to get the distance between each point and the center of the cluster it was assigned to in cluster methods such as agnes, pam, and clara. Thanks! - Moises [[alternative HTML version deleted]] __ [EMAIL PROTECTED]

[R] header line generated write.table

2004-08-18 Thread Y C Tao
I want to write following data frame into a CSV file: Col1 Col2 Col3 Row1 1 1 1 Row2 2 2 2 where Row1, Row2 are the row names and Col1, Col2, Col3 are the column names. The correct CSV file should be: ,Col1,Col2,Col3 Row1,1,1,1 Row2,2,2,2 However, the

Re: [R] calling R from Perl

2004-08-18 Thread Dirk Eddelbuettel
On Wed, Aug 18, 2004 at 03:44:04PM -0400, Sean Davis wrote: Clive, Have a look at Statistics::R (http://search.cpan.org/~gmpassos/Statistics-R-0.02). I'm not sure if it works well with Windows, but it is the only other option that I know of to work directly with the R-interpreter.

[R] Gee

2004-08-18 Thread anafava
I am trying to learn the gee function in R. So I try to generate some data and use this function. I have the following lines: Gee # Generating lny=10+2*Si-Si^2+eta # eta ~ N(0,1) # Si ~ U(0,11) eta - vector(mode=numeric,100) eta - rnorm(100) Si -

Re: [R] header line generated write.table

2004-08-18 Thread Marc Schwartz
On Wed, 2004-08-18 at 16:42, Y C Tao wrote: I want to write following data frame into a CSV file: Col1 Col2 Col3 Row1 1 1 1 Row2 2 2 2 where Row1, Row2 are the row names and Col1, Col2, Col3 are the column names. The correct CSV file should be:

[R] How do I add rows to a table?

2004-08-18 Thread Beverly Seavey
if I read from 1 file: inp1 - scan(data1,list(0,0)) inp2 - scan(data2,list(0,0)) allInp - c(inp1,inp2) I get a table with 4 columns. How can I get a table with 2 columns and more rows? __ [EMAIL PROTECTED] mailing list

Re: [R] How do I add rows to a table?

2004-08-18 Thread Kevin Wang
Hi, On Wed, 18 Aug 2004, Beverly Seavey wrote: inp1 - scan(data1,list(0,0)) inp2 - scan(data2,list(0,0)) allInp - c(inp1,inp2) I get a table with 4 columns. If I understand you correctly... Have you tried cbind()? Cheers, Kevin Ko-Kang

[R] Do you know if you can map a large minmum spanning tree in R?

2004-08-18 Thread Briggs, Meredith M
Do you know if you can map in R? I have my minimum spanning tree, but as there are 1371 nodes (all over Australia) I'd like to be able to graph them as they actually would be on the map. Do you know if this is possible? __ [EMAIL

[R] Getting data loaded

2004-08-18 Thread Jim Lemon
Hi, I have been informed of a bug in the concord package, in that the data files containing the tabulated critical values for Kendall's W are not loaded on the command library(concord). I had assumed that the lines in install.R would correspond to the commands to load data in R, e.g.

Re: [R] Do you know if you can map a large minmum spanning tree in R?

2004-08-18 Thread Michael Sumner
At 09:47 AM 8/19/2004, Briggs, Meredith M wrote: Do you know if you can map in R? I have my minimum spanning tree, but as there are 1371 nodes (all over Australia) I'd like to be able to graph them as they actually would be on the map. Do you know if this is possible? You can

Re: [R] all.equal and names?

2004-08-18 Thread Duncan Murdoch
On Wed, 18 Aug 2004 12:02:02 -0400, Spencer Graves [EMAIL PROTECTED] wrote: Hi, Duncan: Thanks much. I think I remember reading about both all.equal and identical in Venables and Ripley (2002) MASS. Unfortunately, I don't have MASS handy now, and I could not find it otherwise, so I

RE: [R] Do you know if you can map a large minimum spanning tree in R?

2004-08-18 Thread Wade, Fiona M
Thanks Mike. My data has longitude and latitude coords and I used distAB {clim.pact} then mst {ape} to calculate my minimum spanning tree. The nodes are telecoms sites from all over Australia. My goal is to determine the minimum cost of linking them via cabling, and I'm starting by calculating

[R] glmmPQL in R and S-PLUS 6 - differing results

2004-08-18 Thread Simon
Greetings R-ers, A colleague and I have been exploring the behaviour of glmmPQL in R and S-PLUS 6 and we appear to get different results using the same code and the same data set, which worries us. I have checked the behaviour in R 1.7.1 (MacOS 9.2) and R. 1.9.0 (Windows 2000) and the results

Re: [R] labeled break statements in R?

2004-08-18 Thread Roger Levy
Prof Brian Ripley [EMAIL PROTECTED] writes: On 18 Aug 2004, Roger Levy wrote: Are there labeled break statements in R? i.e., something along the lines of TOPLOOP: for(i in 1:m) { for(j in 1:n) { ... if(condition) { break TOPLOOP } } } No, but

Re: [R] Getting data loaded

2004-08-18 Thread Roger D. Peng
I think you should load data in a .First.lib() function, or if you have a namespace, in a .onLoad() function. -roger Jim Lemon wrote: Hi, I have been informed of a bug in the concord package, in that the data files containing the tabulated critical values for Kendall's W are not loaded on the

[R] OS X specific question: help.start() won't launch

2004-08-18 Thread David L. Van Brunt, Ph.D.
It's been a while since I used R, and have certainly applied a few system patches. Since I installed the latest R.bin, when I type help.start() nothing happens anymore. It used to launch a browser with the R help system. Anyone know of any issues here, or ways to re-enable this? Didn't see

Re: [R] labeled break statements in R?

2004-08-18 Thread Gabor Grothendieck
Roger Levy rog at stanford.edu writes: : : Hi, : : Are there labeled break statements in R? i.e., something along the : lines of : : TOPLOOP: for(i in 1:m) { : for(j in 1:n) { : ... : if(condition) { :break TOPLOOP : } : } : } Assuming that your labelled break is

[R] nlme R vs S plus

2004-08-18 Thread Evelyn Hall
Hi all, I'm a PhD student at sydney uni and am trying to run a non linear mixed model program to obtain estimates of parameters describing dairy cow lactation curves. At present, I have been able to get the data to converge using the S plus (S plus 2000) nlme function. However, when I put the

Re: [R] labeled break statements in R?

2004-08-18 Thread Gabor Grothendieck
Gabor Grothendieck ggrothendieck at myway.com writes: : : Roger Levy rog at stanford.edu writes: : : : : : Hi, : : : : Are there labeled break statements in R? i.e., something along the : : lines of : : : : TOPLOOP: for(i in 1:m) { : : for(j in 1:n) { : : ... : : if(condition) { :

Re: [R] labeled break statements in R?

2004-08-18 Thread Gabor Grothendieck
Gabor Grothendieck ggrothendieck at myway.com writes: : : Gabor Grothendieck ggrothendieck at myway.com writes: : : : : : Roger Levy rog at stanford.edu writes: : : : : : : : : Hi, : : : : : : Are there labeled break statements in R? i.e., something along the : : : lines of : : : : : :