August 17, 2016 at 10:05 pm
Comments posted to this topic are about the item Beyond prediction with R & SQL Server
August 18, 2016 at 1:05 am
Nice article. Hope that you will have more in future
August 25, 2016 at 3:03 am
Hi,
Many thanks for the article. It is always nice to see R applied in action.
Can you please let us know the definition of byRegion data frame?
I am not sure the definition/structure required by the heat map so knowing the details will help alot.
Thanks.
August 25, 2016 at 1:53 pm
Hi Jonathan,
Thanks for your question. The byRegion dataframe has 12 individual rows (one for each region / product pairing) with 36 columns (one column of sales info for every month). You can think of it as the time series graphs stacked one on top of the other.
Getting from row-based storage (i.e. a relational database) to the dataframe is a necessary step for a lot of statistical analyses or machine learning. You could do it in many many ways (for example a pivot table in SQL, or using something like dcast() or lapply() in R).
Hope that helps,
Nick
August 26, 2016 at 12:21 am
Thanks Nick!
I used dcast() and did the trick.
Many thanks, if you have other similar articles, keep them coming 🙂
Thanks again
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply