Re: [R] table with 3 varialbes

2009-02-19 Thread patricia garcía gonzález
Hi, Look, is simple with reshape: x - data frame(...) reshape( x, idvar = Subject, direction = wide, timevar = Quarter) Regards, Patricia Date: Thu, 19 Feb 2009 11:02:58 +0100 From: pcando...@gmail.com To: r-help@r-project.org Subject: [R] table with 3 varialbes I have the initial

Re: [R] table with 3 varialbes

2009-02-19 Thread patricia garcía gonzález
Hi, I think you should take a look to ?reshape. Regards Patricia Date: Thu, 19 Feb 2009 11:02:58 +0100 From: pcando...@gmail.com To: r-help@r-project.org Subject: [R] table with 3 varialbes I have the initial matrice: *data.frame(Subject=rep(100:101, each=4),

Re: [R] need help with installRExcel()

2009-02-10 Thread patricia garcía gonzález
Hi , What I did was similar, install R, R(D)COM server an RExcelInstaller package. Then just write installRExcel() in the console. And it works. Something you should know is that there is a specific mailing list for RCOM topic in here:

Re: [R] standardize

2009-02-09 Thread patricia garcía gonzález
Hi, Maybe you are looking for scale( x ) Regards Patricia From: g1enn.robe...@btinternet.com To: r-help@r-project.org Date: Mon, 9 Feb 2009 14:09:04 + Subject: [R] standardize Very quick newbie question sorry; How do I standardize a list of data please

[R] outer to vectors

2009-02-09 Thread patricia garcía gonzález
Hi all, Having a matrix A formed by n vectors as columns. Is there anything to calculate a determined function to all combination of vectors? For example imagine A matrix is compose by vectors a, b and c. And the function to perform is correlation, so I would like to obtain cor(a, b), cor(a,

Re: [R] change individual label colours in a cluster plot?

2009-02-05 Thread patricia garcía gonzález
Hi, If you have a variable, that defines what you want to differentiate (sociology, economics etc.) then you can add color depending on the value of that variable. You will have to convert it to numeric if it is not. An example would be plot( iris[ , 1 ], iris[ , 2], col = iris[ , 3 ] )

Re: [R] t-test

2009-01-29 Thread patricia garcía gonzález
Hi, If you mean if the t.test is done as if the samples where paired, the answer is yes if you write argument paired = TRUE; and the pairs are done in order, that is 1º with 1º, 2º with 2º, etc. As you wrote, (paired = FALSE) the t.test is unpaired, and the order of elements in the vectors

Re: [R] Help

2009-01-29 Thread patricia garcía gonzález
Hi, Test - function(x, y, paired) { res - try( ks.test(...), TRUE ) if( inherits( res, try-error ) ) res - NA res } Regards patricia Date: Thu, 29 Jan 2009 13:22:11 -0300 From: alexandra...@gmail.com To: r-help@r-project.org Subject: [R] Help Hi

[R] Create a vector from matrix.

2009-01-28 Thread patricia garcía gonzález
Hi all, I am trying to create a vector with the information contained in a determined matrix. Let me explain myself. I have a vector like this: q - c(a,a,c,b,d,d,a,e,b,a) And a matrix like: s1 - c(a,b,c,d,e,f,g,h,i,j) e - c(A,B,C,D,E,F,G,H,I,J) s - cbind( e,

Re: [R] Create a vector from matrix.

2009-01-28 Thread patricia garcía gonzález
,a) e[match(q, s1)] I hope it helps. Best, Dimitris patricia garcía gonzález wrote: Hi all, I am trying to create a vector with the information contained in a determined matrix. Let me explain myself. I have a vector like this: q - c(a,a,c,b,d,d,a,e,b

Re: [R] Create a vector from matrix.

2009-01-28 Thread patricia garcía gonzález
it helps. Best, Dimitris patricia garcía gonzález wrote: Hi all, I am trying to create a vector with the information contained in a determined matrix. Let me explain myself. I have a vector like this: q - c(a,a,c,b,d,d,a,e,b,a) And a matrix like

[R] Merge two vectors into one.

2009-01-28 Thread patricia garcía gonzález
Hi all, I have two vectors like this: x - c( Y, H, NA, NA ) y - c( NA, H, NA, B ) And would like to make one vector with the common elements, and the element available only in one of the vectors. res - c( Y, H, NA, B ) Thanks, Patricia From:

Re: [R] Merge two vectors into one.

2009-01-28 Thread patricia garcía gonzález
Is position important? The vectors always have the same length? They always have the same entry if both are not NA? If yes, yes and yes, then res - ifelse( is.na(x), y, x) does what you want. Otherwise please explain better what you want. Gabor On Wed, Jan 28, 2009 at 3:54 PM, patricia garcía

Re: [R] Mode (statistics) in R?

2009-01-26 Thread patricia garcía gonzález
Hello, I think this will work: names( sort( -table( x ) ) )[1] Regards Patricia García From: c...@datanalytics.com To: jasonkrup...@yahoo.com Date: Mon, 26 Jan 2009 18:34:00 +0500 CC: r-help@r-project.org Subject: Re: [R] Mode (statistics) in R? Hello, You can try ?table. Best

[R] (no subject)

2008-05-08 Thread patricia garcía gonzález
Hi everyone, Is there any function to standardize a matrix. For sure it must, but i can't find it. For standardize, i just mean, to make the mean as zero and standard deviation as one.It is also call z-score. Thanks in advance