[R] Help with Sink Function

2010-07-16 Thread Addi Wei
iterations - 100 nvars - 4 combined - rbind(scaleMiceTrain, scaleMiceTest) reducedSample - combined reducedSample - subset(reducedSample, select = -pID50) reducedSample - subset(reducedSample, select = -id) for (i in 1:iterations) { miceSample - sample(combined[,-c(1,2)],nvars,

Re: [R] Help with Sink Function

2010-07-16 Thread Erik Iverson
This is not reproducible, and does not look minimal. You'll get better answers, and probably solve many issues on your own, if you construct small examples that illustrate the same problem you're having with your real data. Addi Wei wrote: iterations - 100 nvars - 4 combined -

Re: [R] Help with Sink Function

2010-07-16 Thread Addi Wei
Sorry about that. Still new to this... The code below should be reproducible.All R2 should just be 1, and I should write 1 to R2outputKKNN.txt 10 timesnothing is happening. Appreciate the efforts to help! for (i in 1:10) { adata = 1:5 bdata = 6:10 lm -

Re: [R] Help with Sink Function

2010-07-16 Thread Matt Shotwell
Your code between calls to sink() does not generate any output. Hence, nothing will be diverted to the file. To illustrate this point, consider for(i in 1:10) i This produces no output. However, for(i in 1:10) print(i) produces output as expected. -Matt On Fri, 2010-07-16 at 13:34 -0400,