Re: [R] BIO-ENV procedure

2004-05-14 Thread Jari Oksanen
On Fri, 2004-05-14 at 00:08, Peter Nelson wrote: I've been unable to find a R package that provides the means of performing Clarke Ainsworth's BIO-ENV procedure or something comparable. Briefly, they describe a method for comparing two separate sample ordinations, one from species data and

[R] Export summary statistics to latex

2004-05-14 Thread Ulrich Leopold
Dear list, I would like to export the summary statistics of a regression to latex code. Is there an easy way of doing that? Ulrich -- __ Ulrich Leopold MSc. Computational Bio- and Physical Geography (CBPG) Institute for Biodiversity and Ecosystem

Re: [R] BIO-ENV procedure

2004-05-14 Thread Jari Oksanen
On Fri, 2004-05-14 at 00:08, Peter Nelson wrote: I've been unable to find a R package that provides the means of performing Clarke Ainsworth's BIO-ENV procedure or something comparable. Briefly, they describe a method for comparing two separate sample ordinations, one from species data and

AW: [R] Export summary statistics to latex

2004-05-14 Thread TEMPL Matthias
Try: Search in Google for r code latex And look for eg. the second entry. You kann also use Sweave (library(tools)) Matthias -Ursprüngliche Nachricht- Von: Ulrich Leopold [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 14. Mai 2004 10:14 An: [EMAIL PROTECTED] Betreff: [R] Export

Re: [R] Problem with logtrans, from library MASS

2004-05-14 Thread Peter Dalgaard
Murray Jorgensen [EMAIL PROTECTED] writes: Greetings all! This problem occurs using R 1.8.1 on Windows XP. I downloaded the binaries for R and all packages, including the VR bundle, in December 2003. The data consists of NZ$ prices and attributes for 643 cars. summary(price)

Re: [R] Problem with logtrans, from library MASS

2004-05-14 Thread Prof Brian Ripley
On 14 May 2004, Peter Dalgaard wrote: Murray Jorgensen [EMAIL PROTECTED] writes: Greetings all! This problem occurs using R 1.8.1 on Windows XP. I downloaded the binaries for R and all packages, including the VR bundle, in December 2003. The data consists of NZ$ prices and

[R] NLME model question

2004-05-14 Thread Darren Shaw
Dear R-helpers I have a problem related to the use of NLME I think is simply a matter of getting the nlme coding correct, but i cannot get my brain around it I am analysing some 24 growth curves of some cells , and i wanted to say that there are significant differences between the curves in

[R] quadratic problem with quadratic constraint

2004-05-14 Thread Ramzi TEMANNI
Hi all, Can we solve Quadratic Program with Quadratic Constraint in R ? Regards, TEMANNI Ramzi DEA Student LimBio http://www.limbio-paris13.org UFR de Santé, Médecine et Biologie Humaine (SMBH) Léonard de Vinci 74, rue Marcel Cachin 93017 Bobigny Cedex France. Tél : 01.48.38.73.07 Tél :

[R] how add objects to an svm graphic

2004-05-14 Thread ale . ambrosi
Dear all, I'm not able to solve easily the following simple problem. I really hope someone can give me some hints. I trained an svm (e1071). Now I'd like to show the results graphically. I used plot.svm and I'd like to add some other objects to the plot: points, (coloured) ellipses to indicate

Re: [R] Problem with logtrans, from library MASS

2004-05-14 Thread Murray Jorgensen
Thanks for the help. The variables do all come from a frame but with various transformations and manipulations. I prefer not to stick them all into a new frame just to call one function. Thanks again, Murray Jorgensen Prof Brian Ripley wrote: On 14 May 2004, Peter Dalgaard wrote: Murray

Re: [R] NLME model question

2004-05-14 Thread Douglas Bates
Darren Shaw [EMAIL PROTECTED] writes: Dear R-helpers I have a problem related to the use of NLME I think is simply a matter of getting the nlme coding correct, but i cannot get my brain around it I am analysing some 24 growth curves of some cells , and i wanted to say that there are

[R] integrate over a serie

2004-05-14 Thread javier garcia - CEBAS
Hi all; I've got temporal series of data. And I'm plotting it with the type 'l', and with a interpolating slipe. Could you advise me about the best way to calculate the area under any of these curves. I know it is very easy to calculate the first one, although have no idea of the second

Re: [R] Export summary statistics to latex

2004-05-14 Thread kjetil
On 14 May 2004 at 10:13, Ulrich Leopold wrote: Dear list, I would like to export the summary statistics of a regression to latex code. Is there an easy way of doing that? Ulrich See function latex() in package Hmisc Kjetil Halvorsen --

Re: [R] watermarks

2004-05-14 Thread kjetil
On 14 May 2004 at 11:45, Karla Meurk wrote: Hi, I would like to plot a graph which sits in the background as a watermark with other plots in the foreground - on top. I have looked through the threads on the r-project website but they seem to concern background colours rather than actual

Re: [R] NLME model question

2004-05-14 Thread kjetil
On 14 May 2004 at 11:11, Darren Shaw wrote: Dear R-helpers I have a problem related to the use of NLME I think is simply a matter of getting the nlme coding correct, but i cannot get my brain around it I am analysing some 24 growth curves of some cells , and i wanted to say that there

RE: [R] how add objects to an svm graphic

2004-05-14 Thread Liaw, Andy
You probably won't be able to do that without modifying plot.svm(). It calls filled.contour() like this: filled.contour(xr, yr, matrix(as.numeric(preds), nr = length(xr), byrow = TRUE), plot.axes = { axis(1) axis(2)

Re: [R] Export summary statistics to latex

2004-05-14 Thread Frank E Harrell Jr
On Fri, 14 May 2004 10:13:47 +0200 Ulrich Leopold [EMAIL PROTECTED] wrote: Dear list, I would like to export the summary statistics of a regression to latex code. Is there an easy way of doing that? Ulrich Depending on the regression model and the summary statistics, you can use the

[R] rma and gcrma do not work in R 1.9.0

2004-05-14 Thread Li, James [PRDUS Non-JJ]
I run R 1.9.0 on windows 2000, and have the following libraries installed: affydata_1.3.1 affy_1.4.23 Biobase_1.4.10 DynDoc_1.3.14 gcrma_1.0.6 hgu133acdf_1.4.3 hgu95av2cdf_1.4.3 hgu95av2probe_1.0 matchprobes_1.0.7 moe430acdf_1.4.3 multcomp_0.4-6 mvtnorm_0.6-6 rae230acdf_1.4.3 reposTools_1.3.29

[R] R-help

2004-05-14 Thread Ruedi Epple
Hi, I have begun to use R some months ago. I have solved many problems, but now I do not reach my aim. I have written a function ?Tranmer.cor? with the parameters x, y and N, which calculates weighted correlation coefficients. It works, when I define the parameters each time I want to run it. But

Re: [R] please help with estimation of true correlations and reliabilities

2004-05-14 Thread Jens Oehlschlägel
Dear John, I checked for the uniquenesses from factanal() and found out that these estimates need an a priori assumption about the number of latent factors (and they depend strongly on that assumption). What I want is an estimate of reliablity independent of such an assumption. Is it possible

Re: [R] rma and gcrma do not work in R 1.9.0

2004-05-14 Thread A.J. Rossini
This is a bioconductor issue, and better suited for that list. Li, James [PRDUS Non-JJ] [EMAIL PROTECTED] writes: I run R 1.9.0 on windows 2000, and have the following libraries installed: affydata_1.3.1 affy_1.4.23 Biobase_1.4.10 DynDoc_1.3.14 gcrma_1.0.6 hgu133acdf_1.4.3

Re: [R] rma and gcrma do not work in R 1.9.0

2004-05-14 Thread Prof Brian Ripley
Isn't this a report on problems with Bioconductor packages? If so, please ask the Bioconductor list as people there will have a much better idea of what you are trying to do. On Fri, 14 May 2004, Li, James [PRDUS Non-JJ] wrote: I run R 1.9.0 on windows 2000, and have the following libraries

Re: [R] R-help

2004-05-14 Thread Gabor Grothendieck
If you want pairwise correlations for the cols of matrix x and N is some parameter to your routine that does not vary throughout the calculation then: apply(x,2,function(a)apply(x,2,function(b)Transmer.cor(a,b,N))) Replace both occurrences of 2 with 1 if you want rows. Ruedi Epple ruedi.epple

[R] type checking --- just a thought

2004-05-14 Thread ivo welch
hi: would it be useful to build into R an optional mechanism that typechecks arguments? for example, sum.across - function ( inpmatrix : matrixtype( dim[1]1, dim[2]3 ) ) : vector { } # this would define a sum.across function that can take matrices or data sets, but not vectors,

[R] A question about default output on the screen

2004-05-14 Thread Song Baiyi
Hello everyone, I got a problem to change the default output on the screen and I use Xemacs ESS and R. When I happen to show a data.frame with thousands of records (type a variable name and return), the screen just freeze or keep scrolling for minutes, because of the large quantity of

RE: [R] type checking --- just a thought

2004-05-14 Thread Wiener, Matthew
Ivo -- The stopifnot statement can be used to do this sort of check. For example, if you need to check that one of your arguments is a vector with length = N, you can add stopifnot(is.vector(myarg)) stopifnot(length(myarg) = N) To the beginning of your function. This will throw an error if

Re: [R] type checking --- just a thought

2004-05-14 Thread Gabor Grothendieck
If its just arg 1 then you can use S3 generics for this. Here it is but we have extended it to data frames too which isn't so easy if you can only specify one type: sum.across - function(x) UseMethod(sum.across) sum.across.matrix - function(x) { stopifnot(is.numeric(x)); c(rowMeans(x)) }

[R] covariates in lm

2004-05-14 Thread mrufino
Dear R list, I have been trying to do a linear model, extracting the effect of a covariate and the results do not match, when I do it with other programs (e.g. minitab) so it is obvious that I was doing something wrong. Whan I do it with minitab, I have this results: (sector is a

RE: [R] covariates in lm

2004-05-14 Thread Liaw, Andy
From the output you've shown, Minitab and R give the same thing when you ask for the same thing. In Minitab, Source DF Seq SS Adj SS Adj MS F P sector 6 9.0605 2.9989 0.49981.21 0.297 depth 134.207211.997311.9973

Re: [R] A question about default output on the screen

2004-05-14 Thread Prof Brian Ripley
But R does not call show() to print, it calls print() unless you have an object with a formal class. You can try setting a new data.frame method for print, but an S3 method, please. On Fri, 14 May 2004, Song Baiyi wrote: I got a problem to change the default output on the screen and I use

Re: [R] type checking --- just a thought

2004-05-14 Thread A.J. Rossini
S4 methods take care of some of this checking (more specification needed). best, -tony ivo welch [EMAIL PROTECTED] writes: hi: would it be useful to build into R an optional mechanism that typechecks arguments? for example, sum.across - function ( inpmatrix : matrixtype( dim[1]1,

[R] RE: How to write an S4 method for sum or a Summary generic

2004-05-14 Thread Swinton, Jonathan
I asked a couple of weeks ago about how to write an S4 method for sum, or another member of the Summary group generics. This prompted an informed and somewhat over my head email discussion off list, but for the benefit of posterity the current answer is 1) Redefine the generic for sum as

[R] problem with aggregate

2004-05-14 Thread Philippe Hupé
Hi, I am trying to do the following aggregation : data - data.frame(a=rep(2,10),b=rep(a,10)) aggregate(data$a, by=list(a1=data$a, b1=data$b), NROW) but I have the following error message Error in names-.default(`*tmp*`, value = c(names(by), names(x))) : names attribute [3] must be the

[R] log Y scales for parplot

2004-05-14 Thread Monica Palaseanu-Lovejoy
Hi, I am doing a barplot, and the fist bar is very big (high values) and the rest of the bars are quite small (small values). So - is there any way to make the Y scale logarithmic so that i have a wider distance from 0 to 50 for example than for 50 to 100, and so on? Thanks in advance for

Re: [R] problem with aggregate

2004-05-14 Thread Prof Brian Ripley
Someone forgot drop=FALSE was needed. Fixed in R-patched. BTW, calling an object `data' is not a good idea. On Fri, 14 May 2004, Philippe Hupé wrote: Hi, I am trying to do the following aggregation : data - data.frame(a=rep(2,10),b=rep(a,10)) aggregate(data$a, by=list(a1=data$a,

RE: [R] please help with estimation of true correlations and reliabilities

2004-05-14 Thread John Fox
Dear Jens, One of the nice features of maximum-likelihood factor analysis, implemented in factanal(), is that you can test for the number of common factors. More generally, the estimated uniquenesses will depend upon the number of common factors. Using sem() requires a stronger initial

[R] Tagging identical rows of a matrix

2004-05-14 Thread Scott Waichler
I would like to generate a vector having the same length as the number of rows in a matrix. The vector should contain an integer indicating the group of the row, where identical matrix rows are in a group, and a unique row has a unique integer. Thus, for a - c(1,2) b - c(1,3) c - c(1,2) d -

RE: [R] Tagging identical rows of a matrix

2004-05-14 Thread Liaw, Andy
Here's one possibility: index - as.numeric(factor(apply(mat, 1, paste, collapse=:))) index [1] 1 2 1 1 2 3 There's probably some better way though... Andy From: Scott Waichler I would like to generate a vector having the same length as the number of rows in a matrix. The vector should

Re: [R] Tagging identical rows of a matrix

2004-05-14 Thread Douglas Bates
Scott Waichler [EMAIL PROTECTED] writes: I would like to generate a vector having the same length as the number of rows in a matrix. The vector should contain an integer indicating the group of the row, where identical matrix rows are in a group, and a unique row has a unique integer. Thus,

Re: [R] Tagging identical rows of a matrix

2004-05-14 Thread Prof Brian Ripley
The trick is to collapse the rows, as Andy Liaw pointed out and unique.matrix (and .data.frame) does. Once you have the collapsed rows as character vectors, unique and match will do a fast job (via internal hashing). (Andy's solution via factor() is the same thing with a bit of extra baggage.)

Re: [R] Tagging identical rows of a matrix

2004-05-14 Thread Gabor Grothendieck
The shortest expression I can think of is: as.numeric(interaction(mat[,1],mat[,2],drop=T)) Completing the thought of those who suggested dist or unique: N - nrow(mat) dd - as.matrix(dist(rbind(mat,unique(mat[-seq(N),seq(N)] apply(dd,2,function(x)match(0,x)) Scott Waichler scott.waichler

[R] Work around for TukeyHSD names

2004-05-14 Thread Martin Henry H. Stevens
R Version 2.0.0 Under development (unstable) (2004-05-07) I have been wanting to use TukeyHSD for two and three way aov's, as they are especially simple for students to use correctly. I realize model simplification is usually a preferred methodology, but my disciplinary enertia and simplicity

RE: [R] Tagging identical rows of a matrix

2004-05-14 Thread Waichler, Scott R
Thanks to all of you who responded to my help request. Here is the very efficient upshot of your advice: mat2 - apply(mat, 1, paste, collapse=:) vec - match(mat2, unique(mat2)) vec [1] 1 2 1 1 2 3 P.S. I found that Andy Liaw's method didn't preserve the index order that I wanted; it yields

Re: [R] Tagging identical rows of a matrix

2004-05-14 Thread Gabor Grothendieck
Waichler, Scott R Scott.Waichler at pnl.gov writes: Thanks to all of you who responded to my help request. Here is the very efficient upshot of your advice: mat2 - apply(mat, 1, paste, collapse=:) vec - match(mat2, unique(mat2)) vec [1] 1 2 1 1 2 3 P.S. I found that Andy Liaw's

[R] Anova precision

2004-05-14 Thread lsjensen
I seem to be running into a machine precision issue below. Should I be using a different method to calculate this or should I do some kind of validity check (i.e. max(tapply(resp,data$Split,var,na.rm=TRUE),na.rm=TRUE)0) in an 'if' statement before the call to anova? Or is there some

Re: [R] xtable without rownames

2004-05-14 Thread Jeff D. Hamann
I just can't get it to work... I've got a data.frame that looks like, ata age.class acres 1 0 94.25871 2 10 202.58106 3 20 254.74497 4 30 326.43598 5 40 170.75596 6 50 146.50230 7 60 76.84737 8 70 90.65786 9 80

[R] help with memory greedy storage

2004-05-14 Thread Arne.Muller
Hello, I've a problem with a self written routine taking a lot of memory (1.2Gb). Maybe you can suggest some enhancements, I'm pretty sure that my implementation is not optimal ... I'm creating many linear models and store coefficients, anova p-values ... all I need in different lists which

Re: [R] xtable without rownames

2004-05-14 Thread Gabor Grothendieck
Data frames are supposed to have unique rownames but it seems xtable does not know that so just set them all to anyways on a copy of ata that you throw away later: ata2 - ata rownames(ata2) - rep(,nrow(ata2)) xtable(ata2) rm(ata2) Jeff D. Hamann jeff.hamann at forestinformatics.com writes: :

Re: [R] log Y scales for parplot

2004-05-14 Thread Marc Schwartz
On Fri, 2004-05-14 at 12:11, Monica Palaseanu-Lovejoy wrote: Hi, I am doing a barplot, and the fist bar is very big (high values) and the rest of the bars are quite small (small values). So - is there any way to make the Y scale logarithmic so that i have a wider distance from 0 to 50

RE: [R] help with memory greedy storage

2004-05-14 Thread Bill Vinyard
Real rough estimate ... looks like you're trying to store about 38 million numbers in the data frame. Do you need all of the models in the dataframe at the end or are you just trying to generate the output and look at it later? Perhaps you could save intermediate results to file, that is, create

RE: [R] Tagging identical rows of a matrix

2004-05-14 Thread Liaw, Andy
The problem with interaction() is that it doesn't scale with increasing number of columns: set.seed(1) mat2 - matrix(sample(20,5e4,rep=T), 1e4) invisible(gc()); system.time(z0 - f0(mat2)) [1] 1.58 0.01 1.85 NA NA invisible(gc()); system.time(z1 - f1(mat2)) [1] 1.57 0.00 1.66 NA NA

Re: [R] factor analysis

2004-05-14 Thread Andrew Criswell
Hello: The website http://ourworld.compuserve.com/homepages/jsuebersax/tetra.htm might provide you with further hints and information on implementing polychoric correlations. Further information related to your inquiry can also be found on http://www.unt.edu/rss/class/rich/5840/ In addition,

Re: [R] Tagging identical rows of a matrix

2004-05-14 Thread Gabor Grothendieck
OK. Good point. I have revised the interaction solution (which is now unfortunately not as short) but it is nearly an order of magnitude faster than the other two using 5 columns. It is solution f4, below: R set.seed(1) R mat - matrix(sample(20,10,rep=T),nc=5) R R f0 - function(mat) { +

Re: [R] xtable without rownames

2004-05-14 Thread Prof Brian Ripley
rownames are for a matrix. row.names are for a data frame. I think you have confused your helpers. Try coercing to a matrix first. I am not sure it will `work fine': it does still seem to have an empty column for the row names. This is hard-coded in print.xtable in the lines cols -