[R] Using a Data Frame/Matrix outside a function

2010-04-01 Thread Greg Gilbert
I have code that creates the same matrices , "a" and "b". The code creating "a" is not in a function and the code creating "b" is in a function. I would like to do operations on "b" like I can on "a", however I can't figure out how I can return a matrix (or data frame) from a function. Thanks for

[R] Returning Data Frame from Function for use Outside Function

2010-03-25 Thread Greg Gilbert
I have a function (see below) that does some bootstrapping (I am happy to expand offline why I could use existing functions.) I put my results into and empty matrix and add a row of results with each iteration. My problem is i am a new user to R and I don't understand data frames, matrices, elemen

[R] Returning Data Frame from Function for use Outside Function

2010-03-25 Thread Greg Gilbert
I have a function (see below) that does some bootstrapping (I am happy to expand offline why I could use existing functions.) I put my results into and empty matrix and add a row of results with each iteration. My problem is i am a new user to R and I don't understand data frames, matrices, elemen

[R] Returning Data Frame from Function for use Outside Function

2010-03-25 Thread Greg Gilbert
I have a function (see below) that does some bootstrapping (I am happy to expand offline why I could use existing functions.) I put my results into and empty matrix and add a row of results with each iteration. My problem is i am a new user to R and I don't understand data frames, matrices, elemen

[R] Returning Data Frame from Function for use Outside Function

2010-03-25 Thread Greg Gilbert
I have a function (see below) that does some bootstrapping (I am happy to expand offline why I could use existing functions.) I put my results into and empty matrix and add a row of results with each iteration. My problem is i am a new user to R and I don't understand data frames, matrices, elemen

[R] Counting a number of "elements" in an object

2010-03-25 Thread Greg Gilbert
I apologize if this has been answered. I have researched this to the best of my ability, that's not to say the answer isn't in the archives just I am a new user and I don't know the proper terms to search under. I have an object: f <- mpr100 ~ time + nhb + hispanic + other +