Evaluating the performance of various methods for generating vectors in R (CC275)

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ค. 2024
  • What is your preferred method for building vectors in R? Do you know its performance characteristics relative to other methods and the size of the vector? In this tutorial, Pat compares 12 methods of building vectors and shows how they compare to each other as well as with increasing size of the vector. He uses the microbenchmark package to evaluate their speed for different sized vectors. Rcpp, purrr, and the base and magrittr pipes will also make an appearance. You'll likely be surprised by the results! This episode is part of an ongoing effort to develop an R package that implements the naive Bayesian classifier.
    If you want to get a physical copy of R Packages: amzn.to/43pMR8L
    If you want a free, online version of R packages: r-pkgs.org/
    You can find my blog post for this episode at www.riffomonas.org/code_club/....
    Check out the GitHub repository at the:
    * Beginning of the episode: github.com/riffomonas/phyloty...
    * End of the episode: github.com/riffomonas/phyloty...
    #rstats #microbenchmark #vectors #rdp #16S #classification #classifier #microbialecology #microbiome
    Support Riffomonas by becoming a Patreon member!
    / riffomonas
    Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at shop.riffomonas.org/youtube to get practice problems, tips, and insights.
    If you're interested in purchasing a video workshop be sure to check out riffomonas.org/workshops/
    You can also find complete tutorials for learning R with the tidyverse using...
    Microbial ecology data: www.riffomonas.org/minimalR/
    General data: www.riffomonas.org/generalR/
    0:00 Introduction
    0:48 Comparing lapply and sapply
    6:23 Base vs. magrittr pipe
    11:35 Comparing map to lapply and sapply
    14:09 Comparing [[]] to []
    17:34 Testing sensitivity to size of n (Complexity)
    22:13 Plotting complexity results
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 11

  • @fourlokody
    @fourlokody 2 หลายเดือนก่อน

    this is my favorite R channel right now.

    • @Riffomonas
      @Riffomonas  2 หลายเดือนก่อน

      ha! here i feel like i'm mired in the weeds - thanks 🤓

  • @djangoworldwide7925
    @djangoworldwide7925 2 หลายเดือนก่อน +2

    I highly recommend on start using Shift + Alt + Down key in order to duplicate (copy+paste) the whole row. its amazing. Also: Shift+Alt+Right/Left key in order to mark to the end or start of the line. Just alt + Up/Down to quickly mark the next row

  • @alcor2180
    @alcor2180 2 หลายเดือนก่อน +1

    Like you say at the end, I think the most important part is about evaluating, in advance, advantages and downsides of each solution for each kind of problem in a software environment that constantly evolve (it's a real ecosystem).
    Thanks for telling about.

    • @Riffomonas
      @Riffomonas  2 หลายเดือนก่อน

      Thanks! Absolutely - it's all about tradeoffs and making the best choice for your application. "One size fits all" fits no one!

  • @zjardynliera-hood5609
    @zjardynliera-hood5609 2 หลายเดือนก่อน

    I have been behind on your videos, very busy with school, but I hope to watch this series and then work on my R package for 16S analysis.

    • @Riffomonas
      @Riffomonas  2 หลายเดือนก่อน

      No worries :) They'll be up until TH-cam is no more 🤓

  • @r4lpha
    @r4lpha 2 หลายเดือนก่อน

    Thanks again Pat!

    • @Riffomonas
      @Riffomonas  2 หลายเดือนก่อน

      My pleasure - thanks for watching!

  • @eric13hill
    @eric13hill 2 หลายเดือนก่อน

    Very useful content

    • @Riffomonas
      @Riffomonas  2 หลายเดือนก่อน

      Thanks Eric!