Displaying 1 result from an estimated 1 matches for "think_one_firm".
2004 Jun 17
2
Question on lists and vectors of lists
I have an elementary programming question. Could someone please point
me in the right direction?
I have a function which will run for thousands of companies. At each
invocation, it returns 2 numbers. I plan to do something like:
think_one_firm <- function(filename) {
# Do stuff
return(list(x=x,y=y))
}
So for each of the firms in my dataset, I will call
think_one_firm(datafilename) and it will give me back two numbers x
and y. I could say:
l = think_one_firm("blah")
print(l$x); print(l$y);
and all would be...