[R] Reading a specific column of a csv file in a loop

2011-11-08 Thread Sergio René Araujo Enciso
Dear all: I have two larges files with 2000 columns. For each file I am performing a loop to extract the "i"th element of each file and create a data frame with both "i"th elements in order to perform further analysis. I am not extracting all the "i"th elements but only certain which I am indicati

Re: [R] How to remove all objects except the sequence

2011-10-20 Thread Araujo . Enciso
Thanks a lot for the answer, it works and really improves the speed of the loop. Best, Sergio René El , Eik Vettorazzi escribió: > Hi Sergio, > how about this: > rm(list=setdiff(ls(),"z")) > cheers. > Am 20.10.2011 11:00, schrieb Sergio René Araujo Enciso:

[R] How to remove all objects except the sequence

2011-10-20 Thread Sergio René Araujo Enciso
Dear All: I would like to know if there is plausible way to say to R to remove all elements in the memory but the sequence. I have a code which makes a loop, and what I want is after the programme has performed all the operation over every "i"th element, to remove all the objects, expect the seque

Re: [R] Help to write to a file

2011-10-11 Thread Sergio René Araujo Enciso
Ok, I see my mistake, just did as you suggest and works. Thanks for the answer people Best, Sergio Rné El 11 de octubre de 2011 19:03, Sergio René Araujo Enciso < araujo.enc...@gmail.com> escribió: > Dear all: > > I am having some problems to use the function "sink()".

[R] Help to write to a file

2011-10-11 Thread Sergio René Araujo Enciso
Dear all: I am having some problems to use the function "sink()". Basically I am doing a loop over two files which contain unit-root variables. Then on a loop, I extract every i element of both files to create an object called z. If z meets some requirements, then I perform a unit root test (ADF t

[R] Quadprog help

2010-02-19 Thread Araujo-Enciso, Sergio Rene
I am having some problems using Quadprog in R. I want to minimize the objective function : 200*P1-1/2*10*P1^2+100*P2-1/2*5*P2^2+160*P3-1/2*8*P3^2+50*P4-1/2*10*P4^2+50*P 5-1/2*20*P5^2+50*P6-1/2*10*P6^2, Subject to a set of constrains including not only the variables P1, P2, P3, P4, P5, P6,