dlab-berkeley / R-Fundamentals

D-Lab's 4 part, 8 hour introduction to R Fundamentals. Learn how to create variables and functions, manipulate data frames, make visualizations, use control flow structures, and more, using R in RStudio.
34 stars 9 forks source link

mean function comment in Part 4 #30

Closed ldliao closed 10 months ago

ldliao commented 10 months ago

majority of the lesson uses the pipe operator not sure if we want to use the pull function for the mean function or summarize to make it more in sync

heroashman commented 10 months ago

@ldliao what code lines are you looking at for this? I'm not sure I follow where it is. Thanks!

ldliao commented 10 months ago

an example: instead of mean(gap$lifeExp) do gap %>% pull(lifeExp) %>% mean() or other ways to write this

heroashman commented 10 months ago

Got it! Thanks. I've updated it