RE: [R] Thanks

2004-09-08 Thread Prof Brian Ripley
On Tue, 7 Sep 2004, Liaw, Andy wrote: A small drawback to Gabor's proposal: aa %:% dd [1] b c d 00 %:% 99 character(0) Defining it as a seq() method for characters is probably not a terribly good idea, as one should expect it to work for any character vectors as input. (One can

Re: [R] C function name garbled

2004-09-08 Thread Prof Brian Ripley
On Tue, 7 Sep 2004, Sigal Blay wrote: On Tue, Sep 07, 2004 at 04:57:57PM -0400, Duncan Murdoch wrote: On Tue, 7 Sep 2004 12:46:55 -0700, S Blay [EMAIL PROTECTED] wrote : I wrote an R wrapper function (phylpro) around a C function (Rphylpro). The first time I'm running my function, it

Re: [R] 64 bit R slower than 32 bit R on Sun Sparc Solaris?

2004-09-08 Thread Prof Brian Ripley
On Tue, 7 Sep 2004, Roger D. Peng wrote: Are you using an optimized BLAS for both builds? That's one possibility. Also, 64-bit builds use up more memory initially since the pointers are bigger. I've tried both 64-bit and 32-bit builds on Sparc/Solaris and haven't seen any slowdown. It

Re: [R] download of 1.9.1

2004-09-08 Thread Peter Dalgaard
Kevin Wang [EMAIL PROTECTED] writes: Hi, On Tue, 7 Sep 2004, Kathy DeRiemer wrote: Hi there, I downloaded version 1.9.1 WinZip file, 9.367 bytes ( so I can update my R Uit doesn't sound right, 9 bytes Or 9K ? Still not making sense. The windows install file is

Re: [R] download of 1.9.1

2004-09-08 Thread Prof Brian Ripley
On 8 Sep 2004, Peter Dalgaard wrote: Kevin Wang [EMAIL PROTECTED] writes: On Tue, 7 Sep 2004, Kathy DeRiemer wrote: I downloaded version 1.9.1 WinZip file, 9.367 bytes (so I can update my R Uit doesn't sound right, 9 bytes Or 9K ? Still not making sense. R-1.9.1.tgz

Re: [R] heatmap help

2004-09-08 Thread Marta Rufino
Hello, I was just doing heatmaps myself ;-) and I had the same problem. It would be nice to have such an example in the help file because it is not clear (thank you). you use (for example... this is my case, which I am doing the distance matrix using vegdist function with Bray curtis

Re: [R] Multiple comparisons in a non parametric case

2004-09-08 Thread Marco Chiarandini
Thanks Rolf and Thomas, It looks to me like what you are doing is trying to judge significance of differences by non-overlap of single-sample confidence intervals. While this is appealing, it's not quite right. Yes, this is what I am trying to do. Apparently, when the replicates are the

[R] plot.dendrogram

2004-09-08 Thread Marta Rufino
Dear R-users, I would like to change the labels size and format in the node ends of a dendrogram, how can I do it? How can I use different symbols/colors in each node ends ? I manage to do it with plot.cluster, but heat map uses plot.dendrogram. Can anyone help me please? thank you Marta

Re: [R] 64 bit R slower than 32 bit R on Sun Sparc Solaris?

2004-09-08 Thread Jason Liao
Thank you very much, Profs. Ripley and Peng! It corrected a big misconception in my mind. By the way, does the Sun Forte 7 compiler produce faster R than the GCC 3.4.1 compiler (which we use)? Jason --- Prof Brian Ripley [EMAIL PROTECTED] wrote: On Tue, 7 Sep 2004, Roger D. Peng wrote:

Re: [R] 64 bit R slower than 32 bit R on Sun Sparc Solaris?

2004-09-08 Thread Prof Brian Ripley
On Wed, 8 Sep 2004, Jason Liao wrote: Thank you very much, Profs. Ripley and Peng! It corrected a big misconception in my mind. By the way, does the Sun Forte 7 compiler produce faster R than the GCC 3.4.1 compiler (which we use)? Not in my experience, although libsunperf helps a lot on

[R] Contract for an R and Stats specialist

2004-09-08 Thread Paul Hussein
Hi all, We have a genuine requirement for Statistical Programmer with experience and knowledge of: . R programming, and . Oracle data base This is to work on an a short term project for a research centre in italy. If anyone would like further information, please feel free to

[R] isoMDS

2004-09-08 Thread Doran, Harold
Dear List: I have a question regarding an MDS procedure that I am accustomed to using. I have searched around the archives a bit and the help doc and still need a little assistance. The package isoMDS is what I need to perform the non-metric scaling, but I am working with similarity matrices, not

[R] Case-Cohort Analysis

2004-09-08 Thread petertait
Hi All, I am in the middle of doing an analysis of a Case-Cohort design. I had three questions about the analysis: a) Does any one know of some public code for developing the patient risk sets (indexed by failure time) or is there a better way to organize the data? b) I was planning to use

Re: [R] plot.dendrogram

2004-09-08 Thread Adaikalavan Ramasamy
Try setting something like cex=0.5 in the plot. It works for at least hclust. Here is a quick example using hclust to show how you can get away with set the colours. data(USArrests) hc - hclust(dist(USArrests), ave) plot(hc, hang=-1, cex=0.5) labels - rownames(USArrests)[ hc$order]; n -

Re: [R] isoMDS

2004-09-08 Thread Prof Brian Ripley
On Wed, 8 Sep 2004, Doran, Harold wrote: 1)Can isoMDS work only with dissimilarities? Or, is there a way that it can perform the analysis on the similarity matrix as I have described it? Yes. The method, as well as the function in package MASS. All other MDS packages are doing a

[R] Stefan Albrecht/HV/Finanzen/Allianz-Sach ist außer Haus. : R-help Digest, Vol 19, Issue 8

2004-09-08 Thread stefan . albrecht
Ich werde ab 09/08/2004 nicht im Büro sein. Ich kehre zurück am 09/27/2004. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. Ursprüngliches Thema: R-help Digest, Vol 19, Issue 8 [[alternative HTML version deleted]] __ [EMAIL

[R] do.call([, ...) question

2004-09-08 Thread Robin Hankin
Hi again everyone I have an arbitrarily dimensional array a and a list jj of length length(dim(a)).The elements of jj are vectors of indexes. How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3]], ...] ? Toy example follows: a - matrix(1:30,5,6) jj - list(5:1,6:1) I want the following

Re: [R] do.call([, ...) question

2004-09-08 Thread Dimitris Rizopoulos
Hi Robin, you could try the following: lis - lapply(seq(1, length(dim(a))+1), function(x,a.,jj.) if(x==1) a. else jj.[[x-1]] ,a.=a, jj.=jj) do.call([,lis) I hope this helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University

RE: [R] isoMDS

2004-09-08 Thread Hanke, Alex
Distances cannot always be constructed from similarities. This can be done only if the matrix of similarities is nonnegative definite. With the nonnegative definite condition, and with the maximum similarity scaled so that s_ii=1, d_ik=(2*(1-s_ik))^-.5 Check out the vegan package. Alex

Re: [R] do.call([, ...) question

2004-09-08 Thread Peter Dalgaard
Robin Hankin [EMAIL PROTECTED] writes: Hi again everyone I have an arbitrarily dimensional array a and a list jj of length length(dim(a)).The elements of jj are vectors of indexes. How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3]], ...] ? Toy example follows: a -

RE: [R] isoMDS

2004-09-08 Thread Prof Brian Ripley
On Wed, 8 Sep 2004, Hanke, Alex wrote: Distances cannot always be constructed from similarities. This can be done only if the matrix of similarities is nonnegative definite. With the nonnegative definite condition, and with the maximum similarity scaled so that s_ii=1, d_ik=(2*(1-s_ik))^-.5

Re: [R] Sweave echoing comments (again)

2004-09-08 Thread Wolski
Hi! I observed it also. There are cases where it is not desirable. It will be quite helpfull, if possible, to have a parameter that allows one to switch of removing the #comments. /E *** REPLY SEPARATOR *** On 9/6/2004 at 1:30 PM Thomas Petzoldt wrote: Hello, I try to

RE: [R] isoMDS

2004-09-08 Thread Hanke, Alex
I don't understand. If isoMDS does not work with distances, why does the help for isoMDS indicate that the Data are assumed to be dissimilarities or relative distances ? Equally confusing is the loose use of the terms dissimilarities and distances in the literature. As you point out in your book

[R] local linear embedding

2004-09-08 Thread Adele Cutler
Is anyone working on interfacing local linear embedding (Saul and Roweis) to R? The only mention I found was in the article Dimension Reduction for Data Mapping (Edwards and Oman) in RNews 3/3. Adele __ [EMAIL PROTECTED] mailing list

RE: [R] do.call([, ...) question

2004-09-08 Thread Kevin Bartz
This worked very well for me: do.call([, c(list(a), jj)) What about you? Kevin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin Sent: Wednesday, September 08, 2004 7:08 AM To: [EMAIL PROTECTED] Subject: [R] do.call([, ...) question Hi

RE: [R] local linear embedding

2004-09-08 Thread Liaw, Andy
Hi Adele, The Matlab code at http://www.cs.toronto.edu/~roweis/lle/code/lle.m seems fairly straightforward to translate to R, so that would be the first thing I'd try. However, one can obviously use better algorithms for sub-tasks within that code, e.g., for finding k-NNs. Best, Andy From:

Re: [R] degrees of freedom (lme4 and nlme)

2004-09-08 Thread Elizabeth Lynch
Hi, I'm looking for pointers/references on calculating den DF's for fixed effects when using crossed random effects. Also, is there an implementation of simulate.lme that I could use in lme4? Thanks, Elizabeth Lynch Douglas Bates wrote: Alexandre Galvão Patriota wrote: Hi, I'm having some

Re: [R] rodbc windows doesn't find dsn

2004-09-08 Thread Jack Tanner
Prof Brian Ripley wrote: Well, we don't know what you are doing! RODBC does work with system DSNs, but did you try odbcDriverConnect? Let me read the help page for you odbcDriverConnect(DSN=foo) works, but odbcConnect(foo) fails as described earlier. Is this as intended? This seems weird,

RE: [R] heatmap help

2004-09-08 Thread Paul Lepp
Thanks Marta (and Andy). Between the two of you I think I got the result I was looking for. I ended up doing the following: heatmap(x, distfun=function(x) as.dist(x)) Thanks again. -Original Message- From: Marta Rufino [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004

[R] Installing packages on OS X

2004-09-08 Thread hadley wickham
On my computer, it seems that (binary?) packages installed through the GUI in RAqua are not used available to the command line version of R, while (source) packages installed with R CMD INSTALL are available to both. This is a problem when I run R CMD CHECK on a package that I am creating that

RE: [R] isoMDS

2004-09-08 Thread Doran, Harold
Thank you. Quick clarification. isoMDS only works with dissimilarities. Converting my similarity matrix into the dissimilarity matrix is done as (from an email I found on the archives) d- max(tt)-tt Where tt is the similarity matrix. With this, I tried isoMDS as follows: tt.mds-isoMDS(d) and

[R] Problems loading Lapack library

2004-09-08 Thread Ed Hughes
I have just installed R 1.9.1 on an old Sun Sparc with the following specs: version Machine hardware: sun4u OS version: 5.6 Processor type: sparc Hardware: SUNW,Ultra-4 The following components are installed on your system: Sun Visual WorkShop C++ 3.0 Sun WorkShop

RE: [R] Contrast matrices for nested factors

2004-09-08 Thread Warnes, Gregory R
You should be able to get the behavior you want using the fit.glh() (short for fit general linear hypothesis) function from the gregmisc/gmodels package. -G -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Fernando Henrique Ferraz P. da Rosa Sent:

Re: [R] Problems loading Lapack library

2004-09-08 Thread Prof Brian Ripley
Haven't you sent this before? d_sign is part of the Fortran runtime support. Since you are running sunperf, you should not have been building libRlapack at all. Please don't try to outsmart R, but let it decide what configuration to try. Once that works, feel free to try to improve it. My

[R] factor always have type integer

2004-09-08 Thread Erich Neuwirth
typeof applied to a factor always seems to return integer, independently of the type of the levels. This has a strange side effect. When a variable is imported into a data frame, its type changes. character variables automatically are converted to factors when imported into data frames. Here is an

RE: [R] factor always have type integer

2004-09-08 Thread Liaw, Andy
?data.frame says: Details: A data frame is a list of variables of the same length with unique row names, given class 'data.frame'. 'data.frame' converts each of its arguments to a data frame by calling 'as.data.frame(optional=TRUE)'. As that is a generic function,

Re: [R] factor always have type integer

2004-09-08 Thread Roger D. Peng
In some cases it makes sense to store character variables as factors (integers with labels) since this can take up much less memory. If you really want to store `v2' as character, just do data.frame(v1, I(v2)) -roger Erich Neuwirth wrote: typeof applied to a factor always seems to return

[R] R/S-plus Course***In Princeton Boston, ***R/Splus Fundamentals and Programming Techniques, september - October, 2004

2004-09-08 Thread elvis
R/S-plus Course***In Princeton Boston,***R/Splus Fundamentals and Programming Techniques, september - October, 2004 XLSolutions Corporation (www.xlsolutions-corp.com) is proud to announce 2-day R/S-plus Fundamentals and Programming Techniques. Princeton,NJ

Re: [R] factor always have type integer

2004-09-08 Thread Prof Brian Ripley
On Wed, 8 Sep 2004, Erich Neuwirth wrote: typeof applied to a factor always seems to return integer, independently of the type of the levels. typeof is telling you the internal structure. From ?factor 'factor' returns an object of class 'factor' which has a set of integer codes the

[R] How to draw an observation uniformly from a given dataset?

2004-09-08 Thread wanr
Hi all, I have two questions stated below: 1. How to draw an observation uniformly from a given data? For example, I have a dataset (or dataframe) with 10 observations (with a set of variables) and I want to uniformly select an observation from this given dataset, that is, the probability of

Re: [R] How to draw an observation uniformly from a given dataset?

2004-09-08 Thread David Forrest
On Wed, 8 Sep 2004 [EMAIL PROTECTED] wrote: Hi all, I have two questions stated below: 1. How to draw an observation uniformly from a given data? For example, I have a dataset (or dataframe) with 10 observations (with a set of variables) and I want to uniformly select an observation from

Re: [R] How to draw an observation uniformly from a given dataset?

2004-09-08 Thread Roger D. Peng
[EMAIL PROTECTED] wrote: Hi all, I have two questions stated below: 1. How to draw an observation uniformly from a given data? For example, I have a dataset (or dataframe) with 10 observations (with a set of variables) and I want to uniformly select an observation from this given dataset, that

[R] cbind in a loop

2004-09-08 Thread Jan Wantia
Dear all, I have a problem with adding columns to a data structure, using 'cbind': I create an array, to which I want to cbind one new colum for every iteration of a loop. Without the loop, the code works and looks like this: Min- array(0,c(129,0)) Min [1,] [2,] [3,] [4,] etc.. file -

Re: [R] factor always have type integer

2004-09-08 Thread Erich Neuwirth
The function I need is valtype-function(x) typeof(ifelse(is.factor(x),levels(x),x)) It is easy enough to write. Are there any other special cases where the values and the storage mode differ? The background for all this is that I am transferring data from R to Excel with VBA and I have to

Re: [R] cbind in a loop

2004-09-08 Thread Sundar Dorai-Raj
Jan Wantia wrote: Dear all, I have a problem with adding columns to a data structure, using 'cbind': I create an array, to which I want to cbind one new colum for every iteration of a loop. Without the loop, the code works and looks like this: Min- array(0,c(129,0)) Min [1,] [2,] [3,]

[R] How to do this combination ?

2004-09-08 Thread wanr
Thanks David first. Probably, David misunderstood my points. source vector = (1,2) the length of the target vector = 3 My expected complete outputs should be: 111, 112, 121, 122, 211, 212, 221, 222. sample(c(1,2),3,replace=TRUE) just gives me one randomly sampled combination at a time.

RE: [R] confidence intervals

2004-09-08 Thread Warnes, Gregory R
You should be able to make small modifications to the ci.lme function provided in the gregmisc/gmodels package. -Greg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Spencer Graves Sent: Friday, September 03, 2004 11:58 AM To: [EMAIL PROTECTED] Cc:

RE: [R] How to do this combination ?

2004-09-08 Thread Liaw, Andy
Try: m - as.matrix(expand.grid(1:2, 1:2, 1:2)) x - m[,1] * 100 + m[,2] * 10 + m[,3] x 1 2 3 4 5 6 7 8 111 211 121 221 112 212 122 222 Note that if the `source vector' is not 1:k for some integer k, you need to coerce the output of expand.grid, as that returns a data frame of

RE: [R] factor always have type integer

2004-09-08 Thread Berton Gunter
Therefore, I would like to know if there are other types of variables (besides factors) which give a misunderstandable answer about the type of their values when asked typeof. Your question is a bit combative, don't you think? R performs as documented, so I think your characterization is

Re: [R] howto load functions?

2004-09-08 Thread Kevin Wang
Hi, Loren Grimes wrote: I realize that this is pretty basic, and I should be able to figure this out: but, how do I write a function [with a text editor] and then load it into an interactive R session? Thanks Try ?source HTH, Kevin -- Ko-Kang Kevin Wang PhD Student Centre for Mathematics and

Re: [R] isoMDS

2004-09-08 Thread Kjetil Brinchmann Halvorsen
Doran, Harold wrote: Thank you. Quick clarification. isoMDS only works with dissimilarities. Converting my similarity matrix into the dissimilarity matrix is done as (from an email I found on the archives) d- max(tt)-tt Mardia, kent Bibby defines the standard transformation from a

[R] Skipping panels in Lattice

2004-09-08 Thread Leon Barmuta
Dear all, I wish to generate a lattice boxplot which skips an empty cell in a design. I have trawled r-help, scruitinized xyplot(lattice) help page, and merrily reproduced examples of using skip from a couple of previous r-help queries and the example given in Pinheiro Bates. But I must be

Re: [R] Skipping panels in Lattice

2004-09-08 Thread Deepayan Sarkar
On Wednesday 08 September 2004 23:18, Leon Barmuta wrote: Dear all, I wish to generate a lattice boxplot which skips an empty cell in a design. I have trawled r-help, scruitinized xyplot(lattice) help page, and merrily reproduced examples of using skip from a couple of previous r-help

Re: [R] factor always have type integer

2004-09-08 Thread Gabor Grothendieck
Note that I(v2) stores v2 as type character but not as class character. For example, R DF - data.frame(x = c(a, b), y = I(c(a, b)), z = I(c(a, b))) R class(DF$z) - character R sapply(DF, typeof) # y and z do have the same type x y z integer character character