Taking Hadley's clue, I guess
x * unlist(lapply(rle(x)$lengths, seq_len))
is faster than my previous suggestion (which Dan had inspired in the
first place).
For
> A vector of the following format:
> (0,0,1,0,0,0,3,0,0,0,2,0,1,0,0,0,0,0,6)
one might
> z <- numeric(length(x))
> r <- rle(x)
>
Appreciate the ingenious and effective suggestions and feedback from:
Dan Davison
Vincent Goulet
Martin Morgan
Hadley Wickham
The variety of technical approaches proposes so far are clear prove of the
strong and flexible capabilites of the R system, and specially the dynamics
and technical unders
A belated postscript to this thread, because it's a more positive slant
that I didn't think of until revising some of the related documentation.
As remarked in my previous post, the automatic coerce methods that
caused Herve problems are generated from the assumption that contains=
in a class d
On Sat, Apr 12, 2008 at 11:47 AM, carlos martinez
<[EMAIL PROTECTED]> wrote:
> > Looking for a simple, effective a minimum execution time solution.
> >
> > For a vector as:
> >
> > c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1)
> >
> To transform it to the following vector without using any loops
On Sat, Apr 12, 2008 at 06:45:00PM +0100, Dan Davison wrote:
> On Sat, Apr 12, 2008 at 01:30:13PM -0400, Vincent Goulet wrote:
> > Le sam. 12 avr. à 12:47, carlos martinez a écrit :
> > >> Looking for a simple, effective a minimum execution time solution.
> > >>
> > >> For a vector as:
> > >>
> > >
Dear package maintainers,
for your information:
Notifications for R-2.7.0 beta check results for Windows binary packages
have been sent out to package maintainers if a maintainer's package
does not pass the checks for R-2.7.0 beta.
Best wishes,
Uwe
__
On Sat, Apr 12, 2008 at 01:30:13PM -0400, Vincent Goulet wrote:
> Le sam. 12 avr. à 12:47, carlos martinez a écrit :
> >> Looking for a simple, effective a minimum execution time solution.
> >>
> >> For a vector as:
> >>
> >> c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1)
> >>
> > To transform it to th
On Sat, 2008-04-12 at 17:48 +0100, Prof Brian Ripley wrote:
> On Sat, 12 Apr 2008, Gavin Simpson wrote:
>
> > Dear list,
> >
> > On Fedora 8 I downloaded the beta version of R via svn. make and make
> > check-all worked fine, but make vignettes is failing with:
> >
> > make[1]: Entering directory
Le sam. 12 avr. à 12:47, carlos martinez a écrit :
>> Looking for a simple, effective a minimum execution time solution.
>>
>> For a vector as:
>>
>> c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1)
>>
> To transform it to the following vector without using any loops:
>
>> (0,0,1,0,1,2,3,0,0,1,2,0,1,0,1,
On Sat, 12 Apr 2008, Gavin Simpson wrote:
> Dear list,
>
> On Fedora 8 I downloaded the beta version of R via svn. make and make
> check-all worked fine, but make vignettes is failing with:
>
> make[1]: Entering directory `/home/gavin/R/2-7-patched/build/src/library'
> building/updating vignettes
> Looking for a simple, effective a minimum execution time solution.
>
> For a vector as:
>
> c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1)
>
To transform it to the following vector without using any loops:
> (0,0,1,0,1,2,3,0,0,1,2,0,1,0,1,2,3,4,5,6)
>
Appreciate any suggetions.
[[altern
Dear list,
On Fedora 8 I downloaded the beta version of R via svn. make and make
check-all worked fine, but make vignettes is failing with:
make[1]: Entering directory `/home/gavin/R/2-7-patched/build/src/library'
building/updating vignettes for package 'grid' ...
processing 'displaylist.Snw'
/us
Hey Roy ... it's been awhile. We have an example of structural
equation modeling in our text in section 6.5. There's also an example
and the R code for the example is here:
http://www.stat.pitt.edu/stoffer/tsa2/chap6.htm
Scroll down to "Code to do Example 6.10 via BFGS"
The scripts are written f
Luke, Brian,
Thank you for your suggestions. Since we were using 0.5-5, the patch
had already been incorporated. It turned out that we had a couple of
problems. The weird one actually lay in the configuration of the
cluster. While we believed the entire cluster had Myrinet, actually the
ma
14 matches
Mail list logo