Re: [R] Is there any R function for data normalization?

2012-10-02 Thread Loukia Spineli
In this case you could use the apply function. Let your k*l matrix is named as y. Then, in order to standardize the values within each column use the following function aver<-apply(y,2,mean) # calculate the mean within each column std<-apply(y,2,sd) # calculate the stabdard deviation within each

[R] Problem with mutli-dimensional array

2012-10-02 Thread Loukia Spineli
I want to make a multi-dimensional array. To be specific I want to make the following array results<-array(0,dim=c(2,2,64,7)) This is the code I have created but it gives no result due to the error "subscript out of bound". x<-rep(7,7) # Missingness in intervention y<-rep(7,7) # Missingness in

Re: [R] Problem with mutli-dimensional array

2012-10-03 Thread Loukia Spineli
) > Ny[i] <- length(1:(y[i]+1)) > l <- 1 # <--- To here > > for(j in 1:(Nx[i])){ > for(k in 1:(Ny[i])){ > > > Hope this helps, > > Rui Barradas > Em 02-10-2012 15:20, Loukia Spineli escreveu: > >> I want to

[R] Problem with colors in contour plot

2012-10-04 Thread Loukia Spineli
Dear R users, I have a 51 by 51 matrix of p-values (named as pvalue_MA). I want to present graphically this matrix in a plot (filled contour plot) where both axes represent probabilities. I have also added a grid in this plot. I want to highlight in white the cells of the grid that represent p-val

Re: [R] Problem with mutli-dimensional array

2012-10-04 Thread Loukia Spineli
> Nx[i] <- length(1:(x[i]+1)) > Ny[i] <- length(1:(y[i]+1)) > results[[i]] <- array(dim = c(2, 2, n[i])) > l <- 1 > > for(j in 1:(Nx[i])){ > for(k in 1:(Ny[i])){ > tmp <- c((0:x[i])[j], (0:y[i])[k],-(0:x[i])[j], -(0:y[i]

Re: [R] Problem with colors in contour plot

2012-10-04 Thread Loukia Spineli
;- sqrt(outer(x^2, y^2, "+")) > filled.contour(cos(r^2)^2, frame.plot = FALSE, >plot.axes = {}, col = mypal) > grid() > > > Hope this helps, > > Rui Barradas > Em 04-10-2012 13:25, Loukia Spineli escreveu: > > Dear R users, > > I have a 51 by

Re: [R] Problem with colors in contour plot

2012-10-05 Thread Loukia Spineli
a contourplot. On Fri, Oct 5, 2012 at 12:08 PM, Jim Lemon wrote: > On 10/04/2012 10:25 PM, Loukia Spineli wrote: > >> Dear R users, >> >> I have a 51 by 51 matrix of p-values (named as pvalue_MA). I want to >> present graphically this matrix in a plot (filled co

[R] List of multidimensional arrays

2012-10-23 Thread Loukia Spineli
Dear all, I am trying to create a list, where each list element is a vector of different length arrays that contain 2by2 matrices. To be more specific there are 11 treatments that are compared with placebo (we have 11 comparisons) and each comparison is studied by a different number of trials and

[R] List of multidimensional arrays

2012-10-23 Thread Loukia Spineli
Dear all, I am trying to create a list, where each list element is a vector of different length arrays that contain 2by2 matrices. To be more specific there are 11 treatments that are compared with placebo (we have 11 comparisons) and each comparison is studied by a different number of trials and

Re: [R] List of multidimensional arrays

2012-10-24 Thread Loukia Spineli
You are absolutely right. I read the guidelines! Mistake to attach 'word' file! The comfort is that at least I got an "A" :). I revise my question approapriately! On Wed, Oct 24, 2012 at 10:36 AM, David Winsemius wrote: > > On Oct 23, 2012, at 11:36 PM, Loukia Spi

[R] List of multidimensional arrays

2012-10-24 Thread Loukia Spineli
Dear all, I am trying to create a list, where each list element is a vector of different length arrays that contain 2by2 matrices. To be more specific there are 11 treatments that are compared with placebo (we have 11 comparisons) and each comparison is studied by a different number of trials and

Re: [R] List of multidimensional arrays

2012-10-25 Thread Loukia Spineli
e pick it up from your email and paste it into > a fresh R session to be sure that it works. > > Perhaps consrtruct manually an example of what you want the answer to look > like. > > Rich > > > > On Wed, Oct 24, 2012 at 3:51 AM, Loukia Spineli > wrote: > >&g

Re: [R] List of multidimensional arrays

2012-10-25 Thread Loukia Spineli
Thank you very much Berend!:) On Thu, Oct 25, 2012 at 4:37 PM, Berend Hasselman wrote: > Loukia, > > Please send your replies to the R-help list. I am CC'ing this to the > R-help list. > > On 25-10-2012, at 15:30, Loukia Spineli wrote: > > > Dear Berend, >

Re: [R] List of multidimensional arrays

2012-10-26 Thread Loukia Spineli
Dear all, to make our life easier, I give you the following dataset (just this vector) and code! It gives me two arrays of different dimensions: the first is a 2x2x1 array and the second is a 2x2x2 array (please, feel free to correct me on the way I define the arrays. This is the first time I am w

Re: [R] Stata Database & R

2012-10-26 Thread Loukia Spineli
Install the "ares" library first. Then type import.data("the direction you have saved the data","dta"). On Fri, Oct 26, 2012 at 11:10 PM, Lorenzo Isella wrote: > Dear All, > I am given some data to analyze. The data is in the form of a Stata > database (.dta file). > What is the best way to impor

Re: [R] List of multidimensional arrays

2012-10-27 Thread Loukia Spineli
} } add On Fri, Oct 26, 2012 at 10:54 AM, Loukia Spineli wrote: > Dear all, > > to make our life easier, I give you the following dataset (just this > vector) and code! It gives me two arrays of different dimensions: the first > is a 2x2x1 array and the second is a 2x2x2 array (pl

[R] List of arrays - problem with dimensions

2012-10-28 Thread Loukia Spineli
Dear all, I want to obtain the following result [[1]] , , 1, 1 [,1] [,2] [1,]11 [2,]11 , , 2, 1 [,1] [,2] [1,]11 [2,]11 , , 9, 1 [,1] [,2] [1,]11 [2,]11 , , 10, 1 [,1] [,2] [1,]11 [2,]11

Re: [R] List of arrays - problem with dimensions

2012-10-28 Thread Loukia Spineli
n't define tn. > > Please pick up your sample code from the email before sending it and > run it in a fresh R session. > > Please stay on list. Your last reply was only to me. > > Rich > > > On Sun, Oct 28, 2012 at 7:41 PM, Loukia Spineli > wrote: > >>

Re: [R] List of arrays - problem with dimensions

2012-10-28 Thread Loukia Spineli
of the hard-to-read > a<-b > and putting spaces after "," > > ## Let > a <- 12 > ## Does > a<-3 > ## mean > a <- 3 > ## or > a< -3 > ## ? > > Rich > > > On Sun, Oct 28, 2012 at 7:51 PM, Loukia Spineli > wrote: > &g

Re: [R] List of arrays - problem with dimensions

2012-10-30 Thread Loukia Spineli
Imagine a list of two arrays. The first array is like a vector that contains ten 2x2 matrices. The second array contains two vectors of 2x2 matrices of length five and three, respectively. I run the code and it gives me what I want for the first array. However, it disappoints me for the second arra

[R] A panel of contour plots through a iteration process

2012-11-08 Thread Loukia Spineli
Dear all, as you can see from the code I want to create *a panel of 11 contour plots through a iteration process*. I found a thread that address the issue of plotting many contour.plots in the same device, but it does not address my problem! I emphasize that the 11 contour plots must be appeared i

Re: [R] A panel of contour plots through a iteration process

2012-11-08 Thread Loukia Spineli
[mailto:thierry.onkel...@inbo.be] > Sent: 08 November 2012 16:12 > To: Jose Iparraguirre; Loukia Spineli; r-help@r-project.org help > Subject: RE: [R] A panel of contour plots through a iteration process > > I would rather use facet_wrap() instead of multiplot() > > Just combi

Re: [R] A panel of contour plots through a iteration process

2012-11-09 Thread Loukia Spineli
,1) points(a[[i]],v[[i]],col="blue",pch=19) textxy(a[[i]],v[[i]],arraynames[[i]],cx=1.0,dcol="blue") }},col=mypal,axes=T,frame.plot=T,main="Graphical display of imputations") } par(mfrow=c(1,1)) On Thu, Nov 8, 2012 at 7:13 PM, Loukia Spineli wrote: > Thank you ver

Re: [R] A panel of contour plots through a iteration process

2012-11-09 Thread Loukia Spineli
iment died of. > > ~ Sir Ronald Aylmer Fisher > > > > The plural of anecdote is not data. > > ~ Roger Brinner > > > > The combination of some data and an aching desire for an answer does not > ensure that a reasonable answer can be extracted from a given body of