Re: [R] slow computation of mixed ANOVA using aov

2005-03-19 Thread Peter Dalgaard
Steven Lacey [EMAIL PROTECTED] writes: Dear R-help list, I am trying to do a mixed ANOVA on a 8960 x 5 dataframe. I have 3 factors for which I want to test all main effects and interactions : f1 (40 levels), f2 (7 levels), and f3 (4 levels). I also have a subject factor, subject, and a

[R] How I calculate nCr with R ? (Como calculo nCr con R? )

2005-03-19 Thread Mario Morales
En español (In Spanish) Necesito calcular la en numeros de combinaciones de n cosas tomando k al tiempo. Como hago eso en R ??? Yo escribí mi propia función pero pienso que de esa forma no es fácil para mis estudiantes . He estado buscando en la ayuda y no he encontrado información sobre una

Re: [R] slow computation of mixed ANOVA using aov

2005-03-19 Thread Peter Dalgaard
Peter Dalgaard [EMAIL PROTECTED] writes: - use a version of R compiled with a fast BLAS, on a fast computer with a lot of RAM... (A ~2K square matrix inversion will take a while, but hours sounds a bit excessive). To wit: system.time(aov(dv~f1*f2*f3+Error(subject/(f1+f3)),data=d)) [1]

Re: [R] How I calculate nCr with R ? (Como calculo nCr con R? )

2005-03-19 Thread Uwe Ligges
Mario Morales wrote: En español (In Spanish) Necesito calcular la en numeros de combinaciones de n cosas tomando k al tiempo. Como hago eso en R ??? Yo escribí mi propia función pero pienso que de esa forma no es fácil para mis estudiantes . He estado buscando en la ayuda y no he encontrado

Re: [R] How I calculate nCr with R ? (Como calculo nCr con R? )

2005-03-19 Thread Jean Eid
do you mean n choose k which is a built in function see ?choose On Sat, 19 Mar 2005, Mario Morales wrote: En español (In Spanish) Necesito calcular la en numeros de combinaciones de n cosas tomando k al tiempo. Como hago eso en R ??? Yo escribí mi propia función pero pienso que de

Re: [R] the number of cluster

2005-03-19 Thread Uwe Ligges
XP Sun wrote: hi, all, how to decide the number of cluster before you use kmeans and hclust? thank you in advance! Depends on your criterion. Best idea is always to use the brain and think about how many clusters are sensible for the particular task/problem/data. For hclust,

Re: [R] How to use a R package with C code

2005-03-19 Thread Sameul M Mwalili
C function name not in load table means that youe DLL/SO file is not loaded. You should use .First.lib - function(lib, pkg) { library.dynam(your_pkg_name, pkg, lib) } Regads, Samuel. Duncan Murdoch [EMAIL PROTECTED] wrote: On Wed, 9 Mar 2005 18:54:36 -0500, [EMAIL PROTECTED] wrote :

RE: [R] How I calculate nCr with R ? (Como calculo nCr con R? )

2005-03-19 Thread Joseph Beyene
Try choose(k,r) choose(10,2) [1] 45 JB -Original Message- From: Mario Morales [mailto:[EMAIL PROTECTED] Sent: March 19, 2005 5:37 AM To: r-help@stat.math.ethz.ch Subject: [R] How I calculate nCr with R ? (Como calculo nCr con R? ) En español (In Spanish) Necesito

[R] problem with legend

2005-03-19 Thread Bernardo Rangel Tura
I have problem with legend command. Please look this script: dcbv.fm Time Series: Start = 1980 End = 2002 Frequency = 1 [1] 2994.023 3388.414 3111.762 2990.967 3077.438 3058.274 3049.934 2974.130 [9] 2889.659 2801.790 2631.391 2661.700 2312.526 2518.968 2567.044 2443.952 [17] 2117.638 2042.461

Re: [R] How I calculate nCr with R ? (Como calculo nCr con R? )

2005-03-19 Thread Michael Dewey
At 10:37 19/03/05, Mario Morales wrote: En español (In Spanish) Necesito calcular la en numeros de combinaciones de n cosas tomando k al tiempo. In English we usually read this as N choose r and with that clue you might go ?choose Incidentally your English is fine although I see the logic in

[R] simple problem, but not for me

2005-03-19 Thread alexbri
Hello, I'm new in R and I want to do one thing that is very easy in excel, however, I cant do it in R. Suppose we have the data frame: data- data.frame(A=c(a1,a2,a3,a4,a5)) I need to obtain another column in the same data frame (lets say B=c(b1,b2,b3,b4,b5) in the following way:

Re: [R] Control of vertical spacing in Lattice key text?

2005-03-19 Thread Deepayan Sarkar
On Tuesday 15 March 2005 17:18, Patrick Connolly wrote: I find the key and legend functions in Lattice very useful. Trouble is, now I can see what else I'd like to be able to do with them. If I put a title on a key, it appears too close to the key itself, and if there's a line break in the

Re: [R] simple problem, but not for me

2005-03-19 Thread Uwe Ligges
alexbri wrote: Hello, I'm new in R and I want to do one thing that is very easy in excel, however, I cant do it in R. Suppose we have the data frame: data- data.frame(A=c(a1,a2,a3,a4,a5)) I need to obtain another column in the same data frame (lets say B=c(b1,b2,b3,b4,b5) in the following

Re: [R] problem with legend

2005-03-19 Thread Uwe Ligges
Bernardo Rangel Tura wrote: I have problem with legend command. Please look this script: dcbv.fm Time Series: Start = 1980 End = 2002 Frequency = 1 [1] 2994.023 3388.414 3111.762 2990.967 3077.438 3058.274 3049.934 2974.130 [9] 2889.659 2801.790 2631.391 2661.700 2312.526 2518.968 2567.044

Re: [R] simple problem, but not for me

2005-03-19 Thread Rolf Turner
[EMAIL PROTECTED] wrote: Hello, I'm new in R and I want to do one thing that is very easy in excel, however, I cant do it in R. Well, if you've deadened your brain by using Excel, no wonder. Suppose we have the data frame: data- data.frame(A=c(a1,a2,a3,a4,a5))

Re: [R] slow computation of mixed ANOVA using aov

2005-03-19 Thread Peter Dalgaard
Peter Dalgaard [EMAIL PROTECTED] writes: - (not too sure of this, but R 2.1.0 will have some new code for multivariate lm, with intra-individual designs, and tests under the sphericity assumptions; it is possible that your models can be reformulated in that framework. You'd have to

Re: [R] simple problem, but not for me

2005-03-19 Thread Spencer Graves
The suggestions by Uwe and Rolf use some of the subtler features of R. A simpler (to me) if more tedious approach is provided by the following: Data - data.frame(a1=1:4, a2=5:8, a3=9:12) Data$b1 - Data$a1/(Data$a1+Data$a2+Data$a3) Data$b2 - Data$a2/(Data$a2+Data$a3) Data a1 a2 a3

RE: [R] Re: Repeated Measures, groupedData and lme

2005-03-19 Thread Ignacio Colonna
Emma, I am not an expert, but I have been trying to fit similar models. Adding to Keith's reply to your question, I can suggest what I concluded was the most reasonable model for my case. Based on Keith's Model1, you might also want to allow for a correlation among years within each

[R] newbie question about beta distribution

2005-03-19 Thread faisal99
hi everyone, I'm still a newbie in statistics, I have a question about beta distribution, that is, On the ref/tutorials I've found on the net, why beta distribution always have value p(x) more than 1? As I know, any probability density function always have value not more than 1? is there any

Re: [R] newbie question about beta distribution

2005-03-19 Thread Roger D. Peng
A probability density must integrate to 1. The specific values of the density can be either more or less than 1. -roger [EMAIL PROTECTED] wrote: hi everyone, I'm still a newbie in statistics, I have a question about beta distribution, that is, On the ref/tutorials I've found on the net, why