stat stat wrote:
> I want to see at which row minimum value of the second column occures.
>
> Therefore I made the following loop:
[snip while-loop]
>
> Is there any more effective way to do that in terms of time consumption?
I don't know about timing, but I understand that loops are
Also note that the Mac OS 10.4 has BSD inside by default, so you may get
away with the same code for Unix/Linux and Mac.
HTH,
Jarimatti Valkonen
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the p
i], VECTOR[i+1]))==FALSE){
> NEWVECTOR=c(NEWVECTOR,VECTOR[i+1])}
> }
>
> > VECTOR
> [1] 3 2 4 5 5 3 3 5 1 6 6
> > NEWVECTOR
> [1] 3 2 4 5 3 5 1 6
How about rle? rle(VECTOR)$values should do the same thing. Don't know
about efficiency, though.
--
Jarimatti Valkone
t;\n")' between the insert commands. Or
append each line with '\n'.
>
> 2)My second problem,
In function run:
>print(eval(e))
Make the evaluation in the workspace environment:
print(eval(e, envir=.GlobalEnv))
Then the results are available in R console