Efficient R

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024
  • For most data analysis and statistical computing, R is efficient enough. However, there are times when we encounter bottlenecks in our code that slow it down significantly. In this lecture, I’ll teach you techniques to identify those bottlenecks and write more efficient code. You’ll learn the fundamental principles of faster R code and discover efficient packages for data analysis. We’ll also touch on advanced optimization methods like parallelization and integrating C++ code. If you have previous experience with R programming and looking to make your R code run faster, this lecture is for you. If you are an R beginner, you’ll still benefit from learning the principles and patterns but the more advanced techniques won’t be relevant for you yet.
    📕 Efficient R Programming Book by Gillespie and Lovelace (O'Reilly): bookdown.org/c...
    🗨️ My lecture on good practice R coding: coming soon (sorry, still need to record it :))

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

  • @iyedghedamsi3016
    @iyedghedamsi3016 7 месяцев назад +4

    I didn't know about the collapse package, this is an amazing discovery ! Thank you for this content

  • @retselisitsoemonyake7060
    @retselisitsoemonyake7060 4 дня назад

    Thank you so much for such an informative video.

  • @charleydublin7304
    @charleydublin7304 6 месяцев назад +2

    THANK YOU - one of the best videos I have had on R in some time

  • @ahmedmo8814
    @ahmedmo8814 8 месяцев назад +4

    Thanks for such an amazing RUclips video. I am a PhD student and this will help me optimize my codes and safe some parts of my memory for other uses. Big love

  • @gabrielmurarideandrade5755
    @gabrielmurarideandrade5755 4 месяца назад

    Special thanks from a brazilian economist! Learned a lot.

  • @aswanijehangeer
    @aswanijehangeer 8 месяцев назад +2

    Great Presentation, Selina. 👍

  •  3 месяца назад

    Great video. I didn't know a lot of the packages, thanks for the clear explanations.

  • @henriquecoelhandrade
    @henriquecoelhandrade Месяц назад

    Amazing video! I work as an econometrician and your presentation gives me a lot of ideas 😊
    Could you share your presentation as a pdf file?

    • @selinabaldauf7529
      @selinabaldauf7529  Месяц назад +1

      Thanks for your nice feedback, good to hear that you got ideas from it!
      A bit clunky, but you can download the presentation pdf from the depths of my Github project:
      github.com/selinaZitrone/tools_and_tips/blob/main/docs/slides/2023_11_16_efficient_r.pdf

  • @mouradhamimed5432
    @mouradhamimed5432 8 месяцев назад +1

    Thanks a lot, great peace of knowledge

  • @sebymusundi4715
    @sebymusundi4715 6 месяцев назад

    Very informative on how to optimize R code

  • @haimkichik
    @haimkichik 5 месяцев назад

    Amazing video. Thanks you, I will start learning from u.

  • @sebastianblandonlondono9734
    @sebastianblandonlondono9734 4 месяца назад

    Great and useful video, thank you so much!

  • @user-sq9wp2ge4h
    @user-sq9wp2ge4h 8 месяцев назад

    Thanks from the Netherlands :)

  • @Sergio-pq3ri
    @Sergio-pq3ri 8 месяцев назад +1

    Thanks Selina.

  • @omarj236
    @omarj236 8 месяцев назад

    this realy helps me with my studies! Thank you Selina

  • @osmanuamadu2084
    @osmanuamadu2084 7 месяцев назад

    Thanks from Ghana.

  • @elcuartokage
    @elcuartokage 8 месяцев назад +1

    Great video 👏🏻👏🏻👏🏻👏🏻

  • @user-sq9wp2ge4h
    @user-sq9wp2ge4h 8 месяцев назад +1

    If possible, could you share the link that you mention in the video concerning a course on parallelisation?

    • @selinabaldauf7529
      @selinabaldauf7529  8 месяцев назад +1

      Sure. You might consider starting with these two ressources:
      - Tutorial on the futureverse: henrikbengtsson.github.io/future-tutorial-user2022/index.html
      - Documentation website of the futureverse with link to further tutorials etc: www.futureverse.org/
      Happy Coding :)

    • @user-sq9wp2ge4h
      @user-sq9wp2ge4h 8 месяцев назад +1

      @@selinabaldauf7529 thank you so much

  • @pipertripp
    @pipertripp 7 месяцев назад

    This was great! Thanks Selina!!

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 2 месяца назад

    Very nice!

  • @datahoffmann
    @datahoffmann 8 месяцев назад +1

    I loved this content

  • @xaviercasas100
    @xaviercasas100 8 месяцев назад

    Hi i create parameterized report for about 30 staff using for loop i think using apply function would be faster thanks for the video 👍. Are you on linked in :)

    • @selinabaldauf7529
      @selinabaldauf7529  8 месяцев назад +1

      Hope you managed to make your loop faster. If in doubt, use profiling to see where your bottleneck is. Oh, and I am not on LinkedIn :)

  • @caty863
    @caty863 7 месяцев назад

    By far, my efficiency hurdles with R are in terms of memory usage. I don't really understand why R needs to load all the dataset into memory before working with it. I am sure the clever guys at Posit could address this issue if they chose to.

  • @CanDoSo_org
    @CanDoSo_org 8 месяцев назад

    Thanks, when using collapse, "filter" is still "filter", not "ffilter", right?

    • @selinabaldauf7529
      @selinabaldauf7529  8 месяцев назад

      You are welcome :)
      Actually, the collapse package does not have a function called "filter".
      To have a fast filter for rows in a table, you can use the function "fsubset". It works similar to the "subset" function in base R, just faster. On the package homepage, you can also find a nice cheat sheet with a list of all collapse functions for different purposes: sebkrantz.github.io/collapse/

    • @CanDoSo_org
      @CanDoSo_org 8 месяцев назад +1

      Thanks.@@selinabaldauf7529

  • @krushnachChandra
    @krushnachChandra 6 месяцев назад

    You have new sub

  • @winspyre
    @winspyre Месяц назад

    👍

  • @generalyoutubewatching5286
    @generalyoutubewatching5286 14 дней назад

    Efficient R is an oxymoron surely

    • @selinabaldauf7529
      @selinabaldauf7529  14 дней назад +2

      @@generalyoutubewatching5286 Yes this argument can be made for sure 😃. Maybe it's more about "efficient enough R" or "more efficient R". But for sure R should not be used if efficiency is the main requirement for a project 😉 But at least in my field (biological science) it's efficient enough for most tasks

  • @yildirimakbal6723
    @yildirimakbal6723 6 месяцев назад

    That means do not write in R.

    • @selinabaldauf7529
      @selinabaldauf7529  6 месяцев назад +1

      Well, I guess it depends on what you want to do 😊 but if speed is the priority, R might not be the right choice

  • @caty863
    @caty863 7 месяцев назад

    *sf::st_intersection(),* the epitome of least efficient code in the universe!

    • @selinabaldauf7529
      @selinabaldauf7529  7 месяцев назад

      Do you by any chance know a more efficient function that does the same thing?

    • @caty863
      @caty863 7 месяцев назад

      @baldauf7529not in R. But performing the same operation in GUI-based packages like QGIS is lightning fast compared to this function. I haven't managed to know why this is so slow at this level.