1 Libraries

2 Dataset - Wide Format

3 Long Format Conversion

3.1 gather(key, value, colname1, colname2, …) function

4 Analyze

## 
## Call:
## lm(formula = sales ~ ., data = bike_long)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -3329170  -240559        0   240559  3329170 
## 
## Coefficients:
##                                             Estimate Std. Error t value
## (Intercept)                                   620493     871074   0.712
## `Bikeshop Name`Ann Arbor Speed                485515    1211852   0.401
## `Bikeshop Name`Austin Cruisers               -156998    1211852  -0.130
## `Bikeshop Name`Cincinnati Speed               428078    1211852   0.353
## `Bikeshop Name`Columbus Race Equipment        382062    1211852   0.315
## `Bikeshop Name`Dallas Cycles                 -160900    1211852  -0.133
## `Bikeshop Name`Denver Bike Shop              3347395    1211852   2.762
## `Bikeshop Name`Detroit Cycles                 317482    1211852   0.262
## `Bikeshop Name`Indianapolis Velocipedes       -30938    1211852  -0.026
## `Bikeshop Name`Ithaca Mountain Climbers      2648228    1211852   2.185
## `Bikeshop Name`Kansas City 29ers             5266288    1211852   4.346
## `Bikeshop Name`Las Vegas Cycles              1035368    1211852   0.854
## `Bikeshop Name`Los Angeles Cycles            -148495    1211852  -0.123
## `Bikeshop Name`Louisville Race Equipment      465960    1211852   0.385
## `Bikeshop Name`Miami Race Equipment           527125    1211852   0.435
## `Bikeshop Name`Minneapolis Bike Shop          510170    1211852   0.421
## `Bikeshop Name`Nashville Cruisers              35022    1211852   0.029
## `Bikeshop Name`New Orleans Velocipedes        879472    1211852   0.726
## `Bikeshop Name`New York Cycles                185872    1211852   0.153
## `Bikeshop Name`Oklahoma City Race Equipment  1223580    1211852   1.010
## `Bikeshop Name`Philadelphia Bike Shop        -114165    1211852  -0.094
## `Bikeshop Name`Phoenix Bi-peds               1582828    1211852   1.306
## `Bikeshop Name`Pittsburgh Mountain Machines   571338    1211852   0.471
## `Bikeshop Name`Portland Bi-peds               484625    1211852   0.400
## `Bikeshop Name`Providence Bi-peds             311415    1211852   0.257
## `Bikeshop Name`San Antonio Bike Shop         -214612    1211852  -0.177
## `Bikeshop Name`San Francisco Cruisers         318795    1211852   0.263
## `Bikeshop Name`Seattle Race Equipment        -313492    1211852  -0.259
## `Bikeshop Name`Tampa 29ers                    -15818    1211852  -0.013
## `Bikeshop Name`Wichita Speed                  688752    1211852   0.568
## categoryRoad                                 -238106     312899  -0.761
##                                             Pr(>|t|)    
## (Intercept)                                 0.481952    
## `Bikeshop Name`Ann Arbor Speed              0.691623    
## `Bikeshop Name`Austin Cruisers              0.897816    
## `Bikeshop Name`Cincinnati Speed             0.726462    
## `Bikeshop Name`Columbus Race Equipment      0.754813    
## `Bikeshop Name`Dallas Cycles                0.895291    
## `Bikeshop Name`Denver Bike Shop             0.009860 ** 
## `Bikeshop Name`Detroit Cycles               0.795188    
## `Bikeshop Name`Indianapolis Velocipedes     0.979808    
## `Bikeshop Name`Ithaca Mountain Climbers     0.037094 *  
## `Bikeshop Name`Kansas City 29ers            0.000155 ***
## `Bikeshop Name`Las Vegas Cycles             0.399904    
## `Bikeshop Name`Los Angeles Cycles           0.903320    
## `Bikeshop Name`Louisville Race Equipment    0.703412    
## `Bikeshop Name`Miami Race Equipment         0.666801    
## `Bikeshop Name`Minneapolis Bike Shop        0.676871    
## `Bikeshop Name`Nashville Cruisers           0.977142    
## `Bikeshop Name`New Orleans Velocipedes      0.473823    
## `Bikeshop Name`New York Cycles              0.879162    
## `Bikeshop Name`Oklahoma City Race Equipment 0.321001    
## `Bikeshop Name`Philadelphia Bike Shop       0.925593    
## `Bikeshop Name`Phoenix Bi-peds              0.201777    
## `Bikeshop Name`Pittsburgh Mountain Machines 0.640841    
## `Bikeshop Name`Portland Bi-peds             0.692157    
## `Bikeshop Name`Providence Bi-peds           0.799013    
## `Bikeshop Name`San Antonio Bike Shop        0.860665    
## `Bikeshop Name`San Francisco Cruisers       0.794361    
## `Bikeshop Name`Seattle Race Equipment       0.797703    
## `Bikeshop Name`Tampa 29ers                  0.989675    
## `Bikeshop Name`Wichita Speed                0.574175    
## categoryRoad                                0.452821    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1212000 on 29 degrees of freedom
## Multiple R-squared:  0.6586, Adjusted R-squared:  0.3055 
## F-statistic: 1.865 on 30 and 29 DF,  p-value: 0.04846