Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: ejonesThanks for this. Good to know that the split() function breaks up the input dataframe into multiple dataframes. And also good to see how to cycle through each of them.
Usually I would want to do that type of data manipulation in LAE since it does it more clearly than the R script. But in this case it doesn't add much complexity and is considerably faster to use R. Of course if you wanted to reduce the amount of data being fed into the R or PowerR nodes to save on memory you would go back to LAE nodes to set up looping.
I wondered if the same thing could be done with the new Power R based nodes so in the attachment I've added a "Linear Regression" node. And then tested the results in two ways: 1) by calculating the model parameters of one model from the model parameters of the other model. 2) by charting the results and visually seeing that they do the same thing.
Attachments:
groupBy_with_R_PowerR_2.brg