Tidying data in R with pivot_wider()

Sdílet
Vložit
  • čas přidán 12. 10. 2021
  • Let's learn how to use the pivot_wider() command from R's {dplyr} package to deal with observations that are spread across multiple rows of a data frame. Your life is about to get better!
    If this vid helps you, please help me a tiny bit by mashing that 'like' button. For more #rstats joy, crush that 'subscribe' button!

Komentáře • 22

  • @EquitableEquations
    @EquitableEquations  Před rokem

    You can find materials from this vid (and others) at github.com/equitable-equations/youtube

    • @TheJq32
      @TheJq32 Před rokem

      Couldn't find the blocks dataset in the link?

    • @EquitableEquations
      @EquitableEquations  Před rokem

      @@TheJq32 It's included in the GLMsData package. The script on GitHub includes code to access the set. Enjoy!

  • @jennanancarrow3007
    @jennanancarrow3007 Před rokem +4

    I spent hours stuck on a question for an assignment. I was completely in tears, and made a desperate pilgrimage to CZcams... and learned exactly how to do the thing in 5 minutes. THANK YOU!!!

  • @randomrants8294
    @randomrants8294 Před rokem +1

    Very well explained without any clutter

  • @sergiochavezlazo5362
    @sergiochavezlazo5362 Před 2 lety

    This is a great video! Thank you very much !

  • @ivanalexandrov8752
    @ivanalexandrov8752 Před 2 lety

    Thank you a lot! I understood it perfectly

  • @nicolafierro1
    @nicolafierro1 Před 7 měsíci

    This was hella useful
    Thanks !!

  • @chitrabalu8280
    @chitrabalu8280 Před 2 lety

    Thanks for this video.

  • @oscarrosalescorzo
    @oscarrosalescorzo Před 2 lety +1

    Thanks!

  • @romanvasiura6705
    @romanvasiura6705 Před rokem

    Thank you!

  • @FlurinaB
    @FlurinaB Před rokem +1

    Thank you so much for this helpful video!! May I ask: After having converted the blocks dataframe into wide format: If i wanted to calculate the mean for time and for number of trial 1 and trial 2, how would that work?

    • @EquitableEquations
      @EquitableEquations  Před rokem

      Hi! It's actually more natural to do those calculations before pivoting. Group_by() and summarize() are built for this!
      czcams.com/video/owkZgyeNXSg/video.html

  • @xiyaluo6891
    @xiyaluo6891 Před rokem +1

    Thanks

  • @CanDoSo_org
    @CanDoSo_org Před rokem

    Thanks, Andrew. It would be more helpful if you can attach the data you used.

  • @OlawaleQuadriOgunsola
    @OlawaleQuadriOgunsola Před 7 měsíci

    Pivot_wider and _longer are in the tidyr package, not dplyr.

  • @vincenzo4259
    @vincenzo4259 Před 2 lety +1

    Thanks