Map functions in purrr (R Tidyverse)

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • Full curriculum at teachingr.com/
    Learn the basics of the map functions and how they can help easily apply a function to elements of a list.

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

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

    Thank the gods for this man. After hours of searching and trial and error, I finally found a youtube channel worth a damn. Thank you for making my life a little easier..

  • @tahadinc1302
    @tahadinc1302 5 лет назад +1

    I really like the way you explained the concept, thank you for the great video

  • @krakenworks7702
    @krakenworks7702 4 года назад +1

    To the point and a clear explanation. Thank you.

  • @ZomnY449
    @ZomnY449 4 года назад +2

    what does the tilde stand for in the manual function of the map?

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

    Nice and simple. Gives a lot of clarity.

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

    Perfectly explained

  • @vrajtalati5300
    @vrajtalati5300 10 месяцев назад

    how did you just kept the console and script in dark mode and everything else in light mode?

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

    thank you very much! What does the ~ stand for before the . ?

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

    Thank you! Very good video and explanation.

  • @DividedStates
    @DividedStates 7 лет назад

    Q: You have a tibble a1 and you write a1 * 2, it returns you are base R data.frame instead of a tibble. Why is that?

  • @MannISNOR
    @MannISNOR 5 лет назад

    Thank you Ben!

  • @riverland0072
    @riverland0072 5 лет назад

    nice...which keyboard do you use please...I like the sound

  • @DimitrisPatikas
    @DimitrisPatikas 4 года назад

    nice. is there any difference from the build-in lapply() or sapply() commands?

    • @TrentTube
      @TrentTube 4 года назад +1

      The nomenclature of base R isn't consistent with the tidyverse. Also, map functions are more feature-rich than the base R alternatives.

  • @brendenmorley2643
    @brendenmorley2643 6 лет назад

    Thank you. Great instruction

  • @c0f2a
    @c0f2a 5 лет назад

    Why we need to use map function from another package? I found lapply/sapply/mapply in the base R makes perfect sense to me.

    • @TrentTube
      @TrentTube 4 года назад

      The nomenclature of base R isn't consistent with the tidyverse. Also, map functions are more feature-rich than the base R alternatives.

  • @DividedStates
    @DividedStates 7 лет назад

    Ok, let's talk about real world problems again. I mean, you seldom have a table with some easy numbers and maybe you maybe want to do more than multipling with 2.
    Let's say: You have a chromatography system which gives you .tsv or .csv files of a specific format. So, you want to transform a number of complex list elements in the same way. Could you make a list of data.frames (e.g. the files saved in the output folder of that instrument) pipe this list of data.frames into map? What if you want to do more then just one operation/function? How would you address specific elements of the data.frames, when piped?

    • @TrentTube
      @TrentTube 4 года назад

      Nest and unnest can help separate out different elements of a list of dataframes, in the process of applying mapping functions to them. The .tsv vs .csv are usually handled with readr.
      See the following cheatsheet for help on more complicated, layered mapping:
      github.com/rstudio/cheatsheets/blob/master/purrr.pdf

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

    good video, but i needed something more complex lmao ! but thank you :D

  • @marlonfermat8115
    @marlonfermat8115 6 лет назад

    nice video, Also , it is not clear why not use apply, lapply ...etc