Please use colMeans()! was: Re: [R] Calculate Mean of Column Vectors?

2005-01-11 Thread Uwe Ligges
Folks, please see ?colMeans (as already pointed out in at least one message) and friends. These are faster than those apply(X, 2, mean) calls and please do use them when publishing code (both in packages in on this list). Uwe Ligges Hello, I've got an array defined as y - rnorm(3000), dim(y) -

[R] integrate()

2005-01-11 Thread Robin Hankin
Hi I found the following unexpected: integrate(function(x){0*x+1+1i},0,1) 1 with absolute error 1.1e-14 One can write a little wrapper, but it's messy. Would it be hard to accommodate such functions? The manpage for integrate() does not mention imaginary numbers. -- Robin Hankin Uncertainty

Re: [R] Data Set

2005-01-11 Thread Anne
You could be really classical and use the iris data! have a look at: http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/DataSets the titanic dataset is a real classic one! However it depends very much what you want to study: Anne - Original Message - From: Talita Leite [EMAIL

RE: Please use colMeans()! was: Re: [R] Calculate Mean of Column Vectors?

2005-01-11 Thread Mulholland, Tom
There are indeed speed advantages in using colSums etc. However the disadvantage is that the newbie doesn't always find the power inherent in the apply, sapply, tapply and mapply. For many things that I do, the speed is the least of my worries; although I take the point that using apply for

[R] automated response

2005-01-11 Thread Jason Gleave
Thank you for contacting me - I am travelling and away from the office between 7th-13th of January although I will be accessing email occasionally. Please contact me on my mobile if the matter is urgent +44 (0)7880 743 962 or in my absence please contact one of the following members team who

Re: Please use colMeans()! was: Re: [R] Calculate Mean of ColumnVectors?

2005-01-11 Thread Dimitris Rizopoulos
Hi Tom, There is the R Reference Card by Tom Short and Rpad, which is extremely useful for a quick browsing of basic R functions. Check: http://tolstoy.newcastle.edu.au/R/help/04/12/9637.html For instance, colSums() and friends are in the Matrices section. Best, Dimitris Dimitris Rizopoulos

RE: [R] Installation of XML library can't find libxml2.dll

2005-01-11 Thread michael watson \(IAH-C\)
Thank you for all the responses; in fact, it was all solved by using Bioconductor library(reposTools) install.packages2(XML) However, I am still having heaps of trouble getting SSOAP, Rcurl and KEGGSOAP to use my proxy server Mick -Original Message- From: dr mike [mailto:[EMAIL

[R] LDA discriminant coefficients

2005-01-11 Thread Robin Gruna
Hi! I want to determine the relative contribution (or importance) of the independet variables in a two-class case from the discriminant coefficients given in obj.lda$scaling. Are the discriminant coefficinets standardized or do I have to do that? What about other method like partial F-test or

RE: [R] Multiple comparisons following nlme

2005-01-11 Thread Lorenz . Gygax
I need to do multiple comparisons following nlme analysis (Compare the effects of different treatments on a response measured repeatedly over time; fixed = response ~ treat*time). If you have an interaction it does not really make sense to conduct a multiple comparison because the difference

Re: [R] Calculate Mean of Column Vectors?

2005-01-11 Thread Christoph Scherber
Dear Thomas, My suggestion would be as follows: y - rnorm(3000) dim(y) - c(3, 1000). #then create three column vectors out of y using cbind(): w-cbind(y[1,],y[2,],y[3,]) # and calculate the row means for (i in 1:1000) z[i]-mean(w[i,1:3]) z Hope I got it right! Regards, Christoph Thomas Hopper

[R] lme4 print and summary errror

2005-01-11 Thread Andrew Beckerman
Hi all - (this is posted to r-help and R-SIG-MAC) OSX 10.3.7, R 2.0.1, lme4/Matrix/latticeExtra latest, fresh install of R. MASS loaded (or not). I am getting an error message for the print() and summary() commands with all lme models I try and run in lme4 (GLMM's work fine). Using the

Re: [R] Calculate Mean of Column Vectors?

2005-01-11 Thread Thomas Hopper
Many helpful replies; my thanks to all of you! colMeans() or the apply() function were what I was looking for (though the looping functions will surely come in handy elsewhere). On Jan 10, 2005, at 11:03 PM, Marc Schwartz wrote: # get the column means z - colMeans(y) Best regards, Tom

[R] Changes in expression in R 2.0.1

2005-01-11 Thread Ale iberna
Hello! plot(1:10,main=expression(1 = m = 5)) The above command works perfectly in R 1.9.1 but returns an error in R 2.0.1 This is documented in NEWS for R 2.0.0 (or ONEWS in R 2.0.1) and it is said: o R no longer accepts associative use of relational operators. That is, 3 2 1

[R] transfer function models

2005-01-11 Thread Samuel Kemp (Comp)
Hi, Does anyone know of a function in R that can estimate the parameters of a transfer function model with added noise like in SAS? Thanks in advance, Sam. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] StructTS

2005-01-11 Thread SAULEAU Erik-André
Dear R-list, I try to use StructTS for some univariate time series, with a type=BSM. I have two questions: 1-in the fitted value of the object, it seems to me that for getting back fitted values, one have to add level, slope and seasonal (or level contains already the two other ones) 2-i am

[R] Re: [R-SIG-Mac] lme4 print and summary errror

2005-01-11 Thread Douglas Bates
Andrew Beckerman wrote: Hi all - (this is posted to r-help and R-SIG-MAC) OSX 10.3.7, R 2.0.1, lme4/Matrix/latticeExtra latest, fresh install of R. MASS loaded (or not). I am getting an error message for the print() and summary() commands with all lme models I try and run in lme4 (GLMM's work

Re: [R] Changes in expression in R 2.0.1

2005-01-11 Thread Uwe Ligges
Ale iberna wrote: Hello! plot(1:10,main=expression(1 = m = 5)) The above command works perfectly in R 1.9.1 but returns an error in R 2.0.1 This is documented in NEWS for R 2.0.0 (or ONEWS in R 2.0.1) and it is said: o R no longer accepts associative use of relational operators. That is,

[R] Kolmogorov-Smirnof test for lognormal distribution with estimated parameters

2005-01-11 Thread Kwabena Adusei-Poku
Hello all, Would somebody be kind enough to show me how to do a KS test in R for a lognormal distribution with ESTIMATED parameters. The R function ks.test()says the parameters specified must be prespecified and not estimated from the data Is there a way to correct this when one uses estimated

[R] Re:Chi-square distance

2005-01-11 Thread [EMAIL PROTECTED]
Hi I'm Ph.D student and I need an R code to compute the chi square diistance between n profile rows in a matrix. could you help me please? Thanks Paola Libero ADSL: 3 mesi gratis e navighi a 1.2 Mega. E poi hai l'Adsl

Re: [R] integrate() and complex values

2005-01-11 Thread Prof Brian Ripley
On Tue, 11 Jan 2005, Robin Hankin wrote: The manpage for integrate() does not mention imaginary numbers. The help page does say f: an R function taking a numeric first argument and returning a numeric vector of the same length. and in R complex numbers are not numeric (see

Re: [R] Changes in expression in R 2.0.1

2005-01-11 Thread Petr Pikal
__ 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] Re:Chi-square distance

2005-01-11 Thread Tobias Verbeke
- Oorspronkelijk bericht - Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Verzonden: dinsdag, januari 11, 2005 12:10 PM I'm Ph.D student and I need an R code to compute the chi square diistance between n profile rows in a matrix. There is a ready-made function dudi.dist in package

Re: [R] Matrix to indexed vector

2005-01-11 Thread Dimitris Rizopoulos
maybe something like: mat - rnorm(9); dim(mat) - c(3,3) mat ### cbind(i=rep(1:nrow(mat), each=ncol(mat)), j=rep(1:ncol(mat), nrow(mat)), value=c(t(mat))) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health

Re: [R] Changes in expression in R 2.0.1

2005-01-11 Thread Ale iberna
Thank you very much! I guess I need a new dictionary! Ales Ziberna - Original Message - From: Uwe Ligges [EMAIL PROTECTED] To: Ale iberna [EMAIL PROTECTED] Cc: R-help r-help@stat.math.ethz.ch Sent: Tuesday, January 11, 2005 12:47 PM Subject: Re: [R] Changes in expression in R 2.0.1

Re: [R] Matrix to indexed vector

2005-01-11 Thread Sean Davis
On Jan 11, 2005, at 7:55 AM, Dimitris Rizopoulos wrote: mat - rnorm(9); dim(mat) - c(3,3) mat ### cbind(i=rep(1:nrow(mat), each=ncol(mat)), j=rep(1:ncol(mat), nrow(mat)), value=c(t(mat))) That will do it. Thanks! Sean __

Re: [R] Matrix to indexed vector

2005-01-11 Thread Sundar Dorai-Raj
Sean Davis wrote: I have a matrix that I want to turn into a transformed matrix that includes the indices from the original matrix and the value. The matrix is simply real-valued and is square (and large (8k x 8k)). I want something that looks like (for the 3x3 case): ijvalue 11

[R] CUSUM SQUARED structural breaks approach?

2005-01-11 Thread Rick Ram
Dear all, Does anyone know where there is R or S code for the CUSUM SQUARED structural breaks approach? (Brown, Durban and Evans, 1975 - used in Pesaran and Timmerman, 2002) The problem is that the breaks package only appears to offer the standard 'unsquared' CUSUM, even though it appears most

[R] Changing the ranges for the axis in image()

2005-01-11 Thread Costas Vorlow
Dear all, I can not find/understand the solution to this from the help pages: Say we have the following script: x-matrix(c(1,1,0,1,0,1,0,1,1),3,3) image(x) How can I change the ranges on the vertical and horizontal axis to a range of my own or at least place a box frame around the image if I

Re: [R] Matrix to indexed vector

2005-01-11 Thread Douglas Bates
Sundar Dorai-Raj wrote: Sean Davis wrote: I have a matrix that I want to turn into a transformed matrix that includes the indices from the original matrix and the value. The matrix is simply real-valued and is square (and large (8k x 8k)). I want something that looks like (for the 3x3 case):

Re: [R] Matrix to indexed vector

2005-01-11 Thread Peter Dalgaard
Sean Davis [EMAIL PROTECTED] writes: On Jan 11, 2005, at 7:55 AM, Dimitris Rizopoulos wrote: mat - rnorm(9); dim(mat) - c(3,3) mat ### cbind(i=rep(1:nrow(mat), each=ncol(mat)), j=rep(1:ncol(mat), nrow(mat)), value=c(t(mat))) That will do it. Thanks! Also,

Re: [R] CUSUM SQUARED structural breaks approach?

2005-01-11 Thread Achim Zeileis
On Tue, 11 Jan 2005 13:10:51 + Rick Ram wrote: Dear all, Does anyone know where there is R or S code for the CUSUM SQUARED structural breaks approach? (Brown, Durban and Evans, 1975 - used in Pesaran and Timmerman, 2002) Not to my knowledge. The problem is that the breaks package

[R] global objects not overwritten within function

2005-01-11 Thread bogdan romocea
Dear useRs, I have a function that creates several global objects with assign(obj,obj,.GlobalEnv), and which I need to run iteratively in another function. The code is similar to f - function(...) { assign(obj,obj,.GlobalEnv) } fct - function(...) { for (i in 1:1000) { ...

Re: [R] Graphical table in R

2005-01-11 Thread Dan Bolser
On 10 Jan 2005, Peter Dalgaard wrote: Dan Bolser [EMAIL PROTECTED] writes: Cheers. This is really me just being lazy (as usual). The latex function in Hmisc allows me to make a .ps file then grab a screen shot of that ps and make a .png file. I would just like to use plot so I can wrap it

[R] thanks

2005-01-11 Thread Cserhti Mtys
Dear all, Thanks to those 3 people who sent me answers to my question. Got the problem solved. Great! Now, another question of mine is: I would like to run an R script from the Linux prompt. Is there any way possible to do this? The reason is, the calculation that I'm doing takes a few

Re: [R] Changing the ranges for the axis in image()

2005-01-11 Thread Sundar Dorai-Raj
Costas Vorlow wrote: Dear all, I can not find/understand the solution to this from the help pages: Say we have the following script: x-matrix(c(1,1,0,1,0,1,0,1,1),3,3) image(x) How can I change the ranges on the vertical and horizontal axis to a range of my own or at least place a box frame

[R] Re: Kolmogorov-Smirnof test for lognormal distribution with estimated parameters

2005-01-11 Thread Vito Ricci
Hi, I believe that to performe KS test parameters must not be estimated by sample data. Despite some advantages, the KS test has several important limitations: 1. It only applies to continuous distributions. 2. It tends to be more sensitive near the center of the distribution than at the

[R] A question about r-help-bounce

2005-01-11 Thread apjaworski
Could somebody please tell me what does the r-help-bounce address do? When I try to respond to an r-help post, my mailer (Lotus Notes) generates the r-help bounce return address automatically in addition to the original sender address and the r-help address. I responded to an r-help message