search for: someoperation

Displaying 2 results from an estimated 2 matches for "someoperation".

Did you mean: someoperations
2010 Nov 09
2
Creating a list to store output objects from a recursive loop
...ted two results for each loop The result1 is a zoo object The result2 is a data frame Now I want to put both of them in a list or some structure ... that I can access or output to a file after the loop is done. For e.g. for (i in 1:20){ niceFunction(x[i],i) } niceFunction (x,i) { result1 = someOperations() #zoo object result2 = someOperations() #data.frame OutputObj[i,1]=result1 OutputObj[i,2]=result2 } How can I go about this? Thanks, S
2007 Mar 23
1
memory, speed, and assigning results into new v. existing variable
...ta frame, and I'm doing a conversion of all columns into factors. Takes a while (thanks to folks here though, for making faster!), but am wondering about optimization from a memory perspective... Internally, am I better off assigning into a new data frame, or doing one of these: dataframe<-someoperation(dataframe) It would seem that re-assigning into the same data frame *might* be more efficient in that I don't have to double the memory with 2 objects, but then again.. there'd have to be a "working copy" in memory until the operation was complete, right? Just curious about the...