Re: [R] Different value between R variance and definition ofvariance

2007-11-28 Thread Stefano Calza
Hi! maybe because sample variance has N-1 at the denominator (say degrees of freedom)? so all.equal((sum(x^2) - 100*mean(x)^2)/99, var(x)) ## TRUE but (sum(x^2) - 100*mean(x)^2)/100 # == your value Stef On Wed, Nov 28, 2007 at 09:56:58AM +0100, Tine wrote: Hi! Let us define random varia

Re: [R] How to view the code of a method?

2007-10-02 Thread Stefano Calza
For S3 methods I'd try something like methods(predict) [1] predict.ar*predict.Arima* predict.arima0* predict.glm [5] predict.HoltWinters* predict.lm predict.loess* predict.mlm [9] predict.n

Re: [R] moran's i

2007-09-27 Thread Stefano Calza
Have a look at library(ape) ?Moran.I Ciao Stefano On Thu, Sep 27, 2007 at 04:09:57PM +0200, [EMAIL PROTECTED] wrote: i would like to perform moran's analysis with r... thanks duccio __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] data frame

2007-09-17 Thread Stefano Calza
Ciao, do you mean the number of records? something like nrow(a) I would also suggest ncol(a) instad of length, which would work for a matrix as well. [Italian] E' quello che cercavi? [/Italian] Ciao Stefano On Mon, Sep 17, 2007 at 06:05:58PM +0200, Alfredo Alessandrini wrote: Hi everybody

Re: [R] Number -> Fraction

2007-09-13 Thread Stefano Calza
Welcome (benvenuto), see "fractions" in library MASS es: > fractions(1/2) [1] 1/2 Ciao Stefano On Thu, Sep 13, 2007 at 04:54:01PM +0200, Mauro Arnoldi wrote: Hi everybody! I'm new to this list and also to the R program. I'd like to know if there is a function able to convert results into