hadleyd2 / group_09-1

Repository for Daniel Hadley STAT 547M project
MIT License
0 stars 2 forks source link

Vectorize Calculation of District Mean Price #7

Closed hadleyd2 closed 4 years ago

hadleyd2 commented 4 years ago

From peer review here, it was pointed out that the calculation of mean listing price by district can be vectorized.

The code in question resides in the EDA.R script with function name mean_price. Right now, the code outputs a 10x2 tibble with district name in the first column and mean price in the second column. This output is subsequently called in violin_plot function also in the EDA.R script.

Any changes should either output the same format or else the violin_plot function needs to be adjusted to the new vectorized output.

I played around with the dplyr::group_map functions and the purrr::map functions. Revisit as time permits.

hadleyd2 commented 4 years ago

No longer relevant, since the violin plots are no longer ordered by group means.