Skip to content
Back to formatted view

Raw Message

Message-ID: <CAAmySGN_2L0CX1+ChieAvnJ-3oP6TNgkGMMqTT1ZCtv6x1GQpw@mail.gmail.com>
Date: 2012-02-14T12:18:36Z
From: R. Michael Weylandt
Subject: Error in apply(x2, 1, diff) : dim(X) must have a positive length
In-Reply-To: <1329155288578-4384608.post@n4.nabble.com>

Yes, I just checked out the bootstrap package: the problem is that it
passes vectors (not matrices) to your function and thats why you get
the error you do. Just use diff() instead of apply(,, diff) in your
function and you'll be fine.

Michael

On Mon, Feb 13, 2012 at 12:48 PM, hithit168 <ccchristy at live.com> wrote:
> Thanks.
>
> I use the bootstrap() function from the bootstrap package. Let me try it
> again to see if I get any luck :)
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Error-in-apply-x2-1-diff-dim-X-must-have-a-positive-length-tp4382435p4384608.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.