[R] error using the subset function in a for loop index

Irucka Embry iruckaE at mail2world.com
Mon Jan 14 23:16:52 CET 2013


Hi all, I have attached the function file (revisedfunction) and the list
of station IDs (StationIDs) in .pdf format documents.

I have written a function to perform various operations on the station
IDs in two groups. The first 6 station IDs require one less step than
the remaining 68 station IDs. The file referenced at the beginning of
the function is the file containing the StationIDs.

I created a for loop to allow indexing through each set of station IDs.
I have not been able to run the complete function because I can not
subset the for loop index within the subset function.

Is there a way to perform this operation: Sample <-
subset(Sample,station_id==[i]) within the indexed for loop using another
built-in function or through the subset function? The attached file
revisedfunction provides the full function code in which that line
creating another instance of the variable Sample is excerpted from.

Thank-you.

Irucka Embry 


<span id=m2wTl><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Get the Free email that has everyone talking at <a href=http://www.mail2world.com target=new>http://www.mail2world.com</a><br>  <font color=#999999>Unlimited Email Storage – POP3 – Calendar – SMS – Translator – Much More!</font></font></span>


More information about the R-help mailing list