Re: [R] vectors of matrix as iinput to lapply

2012-02-05 Thread Poersching
Am 05.02.2012 15:54, schrieb Alaios: Dear all I am using lapply (actually mclapply that share the same syntax). I want to call the same function that takes as input a vector. My initial data structure is a matrix that I want to cut it to multiple vectors (one vector for every row of the matrix

Re: [R] Determine the dimension-names of an element in an array in R

2009-08-01 Thread Poersching
after running your code, you will notice > that this is actually the correlation between > DataArray_1["A2","B1","D1",] and DataArray_2["A1",C1","D1",] and so on. > > The code gives the correct result only in case where elements > cor

Re: [R] Determine the dimension-names of an element in an array in R

2009-07-29 Thread Poersching
1, D1 and A1, C2, D1. So the "1:length(c)" writes only the correlation between the B and C out of the whole correlation array. That's also why the sequence in the second apply function is changed. Regards Christian. Poersching schrieb: > Hey, > I think I have a solutio

Re: [R] Determine the dimension-names of an element in an array in R

2009-07-28 Thread Poersching
s just wondering if there are any other alternative way-outs > to solving my problem. That's why I tried with apply functions > (sapply)assuming that this might work out faster even fractionally as > compared to for-loop. > > Cheers, > Sauvik > > On Mon, Jul 27, 200

Re: [R] Determine the dimension-names of an element in an array in R

2009-07-26 Thread Poersching
cor values greater 0.5 or smaller -0.5, like: findIndex(Correl,Correl[Correl>0.5]) findIndex(Correl,Correl[Correl<(-0.5)]) I have changed the code of the function findIndex in line which contents: el[j]<-which(is.element(data,element[j])) Rigards, Christian > > On Sun, Jul 26, 2009

Re: [R] zoo plot: yearly marks on X-Axis

2009-07-26 Thread Poersching
stvienna wiener schrieb: > Hi all, > > I am plotting a financial time series, but I need a more detailed X-Axis. > > Example: > x <- zoo(rnorm(1:6000), as.Date("1992-11-11")+c(1:6000)) > plot(x) > > The X-Axis is labeled "1995", "2000" and "2005". > I would need either "1995", "1997", etc. or maybe

Re: [R] Determine the dimension-names of an element in an array in R

2009-07-26 Thread Poersching
Sauvik De schrieb: > Hi Gabor: > Many thanks for your prompt reply! > The code is fine. But I need it in more general form as I had mentioned that > I need to input any 0 to find its dimension-names. > > Actually, I was using "sapply" to calculate correlation and this idea was > required in the mid

Re: [R] graphs

2009-07-25 Thread Poersching
Mary A. Marion schrieb: > Hello, > > I am plotting two distributions and want to draw a vertical line at > the critical point 149. > How can I stop it from going further up than the norm(140,15) curve? > > x<-seq(75,225,0.1) > plot(x,dnorm(x,mean=140, sd=15), type='l', col='navy') > abline(v = 149,

Re: [R] yaxp problem for more irregular time series in one plot

2009-07-25 Thread Poersching
lanc...@fns.uniba.sk schrieb: > Good day, > > I'm trying to get more time series in one plot. As there are bigger > differences in values of variables I need logaritmic y axis. > > The code I use is the following: > > nvz_3_data <- read.csv('/home/tomas/R_outputs/nvz_3.csv') > date <- (nvz_3_data$d