Re: [R] number of items to replace is not a multiple of replacement length

2013-07-26 Thread Pascal Oettli
Hello, Once again, the matrix EWMA has not the correct size. Did you carefully read the answer by Thomas Stewart? https://stat.ethz.ch/pipermail/r-help/attachments/20130724/c454b0f7/attachment.pl Extract of his reply: "When you expand the example to 5 stocks, there will be 15 elements (5 varian

[R] number of items to replace is not a multiple of replacement length

2013-07-25 Thread G Girija
Hi All, I have 5 stock values and i am calculating EWMA followed the logic as given ind following link.[ http://www.orecastingfinancialrisk.com/3.html ] library('tseries') returns[,1]<-returns[,1]-mean(returns[,1]) returns[,2]<-returns[,2]-mean(retu

Re: [R] number of items to replace is not a multiple of replacement length

2012-06-29 Thread ascotilla
Thanks a lot, I thought I was moving forward because I got a different error, but it seems that I didn't move forward at all..:-S...It was quite basic, right...? That was very helpful, I'll try to sort out the dimensions problem now on my own...I want to fight a bit with it to see if I'm able to s

Re: [R] number of items to replace is not a multiple of replacement length

2012-06-29 Thread MacQueen, Don
Here is an example to use as a starting point for what that error message means. > x <- 1:6 > > x[1:5] <- 1:2 Warning message: In x[1:5] <- 1:2 : number of items to replace is not a multiple of replacement length The expression x[1:5] <- means that we are about to replace the first five ele

[R] number of items to replace is not a multiple of replacement length

2012-06-29 Thread ascotilla
Hello, I'm a complete newbie to R so sorry if this is too basic..:-S I have to modify some scripts someone else did to make it work with my data. For some reason, one of the scripts which were supposed to work is not, and I get the error message "number of items to replace is not a multiple of re

Re: [R] number of items to replace is not a multiple of replacement length

2011-11-18 Thread Milan Bouchet-Valat
Le vendredi 18 novembre 2011 à 04:45 -0800, Gyanendra Pokharel a écrit : > Hi all, following is my R -code and shows the error given below > > n <- 100 > > k<-2 > > x1 <-c(1, 3);x2 <- c(2,5) > > X <- matrix(c(0,0), nrow = 2, ncol = n) > > for(i in 1:k) > + X[i, ] <- mh1.epidemic(n,x1[i],x2[i]) > Er

[R] number of items to replace is not a multiple of replacement length

2011-11-18 Thread Gyanendra Pokharel
Hi all, following is my R -code and shows the error given below > n <- 100 > k<-2 > x1 <-c(1, 3);x2 <- c(2,5) > X <- matrix(c(0,0), nrow = 2, ncol = n) > for(i in 1:k) + X[i, ] <- mh1.epidemic(n,x1[i],x2[i]) Error in X[i, ] <- mh1.epidemic(n,x1[i],x2[i]):   number of items to replace is not a mult

Re: [R] number of items to replace is not a multiple of replacement length

2011-09-28 Thread Jean V Adams
dunner wrote on 09/28/2011 08:43:32 AM: > > Please help with this error message > > drugbook is an 885 x 32 dataframe > > >names(drugbook) > > [1] "DRUG1" "DRUG2" "DRUG3" "DRUG4" "DRUG5" > [6] "DRUG6" "DRUG7" "DRUG8" "DRUG9" "DRUG10" > [11] "DRUG11"

[R] number of items to replace is not a multiple of replacement length

2011-09-28 Thread dunner
Please help with this error message drugbook is an 885 x 32 dataframe >names(drugbook) [1] "DRUG1" "DRUG2" "DRUG3" "DRUG4" "DRUG5" [6] "DRUG6" "DRUG7" "DRUG8" "DRUG9" "DRUG10" [11] "DRUG11" "DRUG12" "DRUG13" "DRUG14" "DRUG15"

Re: [R] number of items to replace is not a multiple of replacement length

2010-11-01 Thread Mipam Bruining
Hello, I just wanted to say that I just stumbled upon the solution by accident! After your comment on lists I searched for some more information on vectors, lists and matrices. I read that using double ['s instead of singles drops the names of the dimensions used. I then gave parameterList[aCounte

Re: [R] number of items to replace is not a multiple of replacement length

2010-11-01 Thread Mipam Bruining
Hello, here are the results from using dput() on the objects in question. >dput(blaah) structure(list("Insert single selection box title here", "Insert slider bar title here", "SingleSelect", "Slider", 1, 50, list("Option a", "Option b", "Option c"), list(0, 100)), .Dim = c(2L, 4L), .

Re: [R] number of items to replace is not a multiple of replacement length

2010-11-01 Thread Ivan Calandra
Hi, I think you _*should*_ provide more: - the objects you have, such as parameterList and blaah: copy the output from dput(object) in your next e-mail - the _*relevant*_ code for how you've built them I guess you will get more and better answers if you give a clear and complete description o

[R] number of items to replace is not a multiple of replacement length

2010-11-01 Thread Mipam Bruining
Hey all, I am writing a function in which I will have a matrix of 4 columns and a variable amount of rows. The first to columns will always contain be of the Character type, the third and fourth columns can be a variation of data types, usually characters and integers, but sometimes lists or matri

[R] bootstrapping error message "Error in t.star[r, ] <- statistic(data, i[r, ], ...) : number of items to replace is not a multiple of replacement length"

2009-07-08 Thread Karina Boege
- boot(Datos, mystat, 2000) Error in t.star[r, ] <- statistic(data, i[r, ], ...) : number of items to replace is not a multiple of replacement length Anyone familiar with this error message? Does anyone knows the minimum sample size for boot package to run properly? Is there anyway to tell R