Alternative to for loops in R with purrr's map, map_dbl, and map_dfr functions (CC043)

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024

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

  • @joseluisloren904
    @joseluisloren904 2 года назад +5

    I discovered this channel looking for answers related to R and RStudio questions I had.
    I want to thank you for the videos. Great explanations, direct and clear. Thanks!

  • @mikedavis979
    @mikedavis979 11 месяцев назад

    Why does your voice sound funny in this episode? I'm guessing microphone or video processing, or something like that. Or did you have a cold? Ha ha. Anyway, I LOVE your content!!! You have so many videos, surely you can't look through all the comments on all of your videos. That would be a FT job (at least it seems that way). Anyhoo. I took both your online (zoom) MinimalR and mothur workshops, and they have helped so much, as well as your Code Club videos. Thanks again, Pat! Edit on comment: seems like your voice sounded different more in the first 5 minutes of the video. Or maybe I have recently ingested too much EtOH, as an ingredient in double IPAs. Ha! Anyway, your videos are so helpful, they are a positive contribution to reproducible science, insights into Microbiology, Microbiomes, and statistical analyses in general. Also a boon to using R for significant biological research. I better quit before the lauding seems more like exaggerated adulation.

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

    Great thanks so much. Keep up the good work

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

    Great video and explanation!

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

      Hi Ankit - Glad you liked it! Thanks for watching and please be sure to spread the word :)

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

    Happy birthday

  • @terraflops
    @terraflops 2 года назад +2

    with so many YT channels asking me to "SMASH THE LIKE BUTTON" it has removed my ability to do so on this video.

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

      HA! Well, just be sure to keep coming back for more :)

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

    Thanks for the video! Very informative - I'm definitely going to be coming back for more videos. Quick question @15:13 - "I'm only interested in sampling the same number of genomes 100 times... *so threshold = 3*"
    Why is the threshold 3 here? Is it because we're only sampling 3 genomes?

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

      Thanks for watching! It's been a while since I did this, but looking back at the code quickly, I think I was drawing 3 genomes from each species 100 times

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

      @@Riffomonas Thanks for the clarification! You're a true gentleman for replying.

  • @javierhernando5063
    @javierhernando5063 3 года назад +2

    Great video! What if some of the columns can't be coerced to numeric value? Let say I am performing iterative analysis through a large database in which several variables can't be calculated, but however, I am more interested in running the whole database than picking one by one the variables

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

      If your function needs numeric values, then I'd suggest only running the map functions on those columns that are numeric. Alternatively, you could use pivot_longer to put those columns into a single column, then using nest and map with mutate. I have another episode that shows how to do this here: ruclips.net/video/lhst1oc9mKQ/видео.html

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

    Hi can you do a episode to compare two graphs for the purpose of validation?

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

      Hmmm maybe but I’m not sure what you mean. Do you have an example?

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

      @@Riffomonas if I have two similar graphs done by two independent programmers, how do I compare them programmatically to see if there are differences? For example, two scatter plots

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 Год назад +1

    Pat,
    This might sound like an out of place comment but have you heard of something called a "super assignment operator" designed by

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

      Yeah it allows you to modify a variable so that it remains changed outside of a function even if you don’t return that variable. This is generally seen as a very bad idea

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

      Aha! Basically defining a local variable as global. I know this is considered bad form in python (probably all languages) in general.