Re: [R] Finding the Min.

2007-01-30 Thread Jarimatti Valkonen
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

Re: [R] How to detect if R is running on Mac OS X?

2007-01-15 Thread Jarimatti Valkonen
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

Re: [R] How to remove similar successive objects from a vector?

2006-08-16 Thread Jarimatti Valkonen
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

Re: [R] tkinsert

2006-08-12 Thread Jarimatti Valkonen
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