10 Tidyverse Functions - #2 Across (w/ Group By + Summarize)

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • The {across} function was just released in #dplyr 1.0.0. It's a NEW #tidyverse function that extends {group_by} and {summarize} for multiple column & function summaries. Learn how to use across() to summarize data like a data wizard. Here are the links to get set up 👇
    1. Sign Up to Get the R-Tips Weekly (You'll get access to GitHub Code + NEW R-Tips as they are released): learn.business...
    2. Check out the R-Tips RUclips Setup Video ( • Setup R Project from G... ).
    Once you take these actions, you'll be set up to receive R-Tips with Code every week. 👍
    THE R-TRACK PROGRAM
    🆓FREE R-TRACK MASTERCLASS: learn.business...
    ==============================
    Learning R is tough, takes a long time, is advanced, is...
    What am I say?! Learning R for business can be fast & fun. Here's how.
    I have a complete system designed to teach you R, Data Science, Advanced Machine Learning, Web App Development, Time Series, & more - all for business. It's insanely powerful. Over 6+ months, learn everything needed to become an R Rockstar for Your Organization.
    👉Learn more: university.bus...

Комментарии • 13

  •  9 месяцев назад

    super

  • @ahmed007Jaber
    @ahmed007Jaber 2 года назад

    thank you for this Matt. got one question suppose I want to count the number of observations by row to know how many of the columns is filled with data, how would you go about it?

    • @BusinessScience
      @BusinessScience  2 года назад

      There is a big difference between data structure- wide vs long. In general, counting is best done in the long format using group by, summarise, and n(). Now that’s not to say you can’t make a special function to count across, but I’d go for making a summary table that summarizes this information. If you’d like more tips then you might check out my 101 course that covers these techniques. university.business-science.io/p/ds4b-101-r-business-analysis-r

    • @ahmed007Jaber
      @ahmed007Jaber 2 года назад +1

      @@BusinessScience thank u matt for this. i was thinking about this and then concerting it into wide format. due to my needs i need to do it that way. i am determined to take your course soon, hopefully :)

    • @BusinessScience
      @BusinessScience  2 года назад

      @@ahmed007Jaber you’re welcome. The course will really help.

  • @russelllavery2281
    @russelllavery2281 Год назад

    larger fonts please.

  • @rajm5349
    @rajm5349 3 года назад +1

    Hi sir kindly provide any two good projects to crack an 4+ years experience interview, so that it will be helpful and i'am from science background

    • @BusinessScience
      @BusinessScience  3 года назад

      Absolutely. I teach 8 projects and how to go from beginner to advanced in my 5-Course R-Track Program. university.business-science.io/p/5-course-bundle-machine-learning-web-apps-time-series

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 2 года назад

    The across function looks like some of the apply functions or map functions. What is the difference?

  • @osoriomatucurane9511
    @osoriomatucurane9511 Год назад

    Hi Matt, This is really a life saver. Thank you a lot.
    I am trying to wrapp up the list of functions with the format () and round() functions in order to get the output formatted with comma separator e rounded to 2 digits.
    .fns = format(round(list(mean, sd,................), 2), nsmall = 2, big.mark = ","), but I can not get it right.
    Thank you for all your support

    • @BusinessScience
      @BusinessScience  Год назад

      Not 100% sure what you are trying to do. I suggest using the scales package. It’s a lot easier than format(). scales::dollar() and scales::percent(). I cover these in the 1st course of my R-Track.

    • @BusinessScience
      @BusinessScience  Год назад

      Also I suggest making functions that create each mean and sd individually