Don't write loops in R

  Рет қаралды 4,525

Bruno Rodrigues

Bruno Rodrigues

Күн бұрын

Пікірлер: 17
@djangoworldwide7925
@djangoworldwide7925 3 жыл бұрын
Only Chanel on KZbin for advanced r users. Thank you!
@brodriguesco
@brodriguesco 3 жыл бұрын
At 20:17, it should be plan(multiprocess, workers = 4) for it to work.
@emintavlayan
@emintavlayan 2 жыл бұрын
You are the man 👍
@kurtkessler3664
@kurtkessler3664 3 жыл бұрын
Thank you Dr. Rodrigues! This is very helpful. I was able to use this immediately. However I had to do one more step after I created the purrr_dfr(). Because I may have 100+ xlsx files, I said: x
@tighthead03
@tighthead03 2 жыл бұрын
Another excellent video
@raretapes8057
@raretapes8057 Жыл бұрын
I haven’t written a loop in over a year. In that time I stopped drinking, started donating a litre of blood per week and am able to exhibit a photographic memory. Jokes aside: loops suck. No more loops. No more off-by-one index errors.
@andrewchen3735
@andrewchen3735 3 жыл бұрын
Hi Bruno, been following your video lately, great content! Just wondering, is there an advantage to use R on Spacemacs, or just your personal preference?
@brodriguesco
@brodriguesco 3 жыл бұрын
it comes down to personal preference. Vim-mode in Rstudio is not that great, but is perfect in spacemacs!
@hansmeiser6078
@hansmeiser6078 3 жыл бұрын
I get: Error in .f(.x[[i]], ...) : unused argument (.x[[i]]) with: counter
@brodriguesco
@brodriguesco 3 жыл бұрын
counter needs to be an argument of the function
@hansmeiser6078
@hansmeiser6078 3 жыл бұрын
@@brodriguesco hm...purrr::map(myVect,hello,counter) Error in .f(.x[[i]], ...) : unused argument (0)... Could you provide an example with arguments?
@brodriguesco
@brodriguesco 3 жыл бұрын
sure, give me some time
@brodriguesco
@brodriguesco 3 жыл бұрын
@@hansmeiser6078 here, hope this helps: gist.github.com/b-rodrigues/a3f2b5829d31988d64339f76971df726
@hansmeiser6078
@hansmeiser6078 3 жыл бұрын
@@brodriguesco Thank you very much Bruno! Well, I would never guess it myself, that the error is caused by a variable standing in global env....amazing. For me its seems a little bit strange, that the trigger of hello in map() needs no param. named 'counter'.
@ratral
@ratral 2 жыл бұрын
Thanks 👍
@djangoworldwide7925
@djangoworldwide7925 3 жыл бұрын
What's the difference between lapply and map?
@brodriguesco
@brodriguesco 3 жыл бұрын
Hadley Wickham wrote a great answer here stackoverflow.com/a/47123420
Don't write loops in R (part 2) with purrr::reduce
11:28
Bruno Rodrigues
Рет қаралды 6 М.
The tutorial you need to maximize your use of R's lists (CC276)
37:46
Riffomonas Project
Рет қаралды 852
When u fight over the armrest
00:41
Adam W
Рет қаралды 11 МЛН
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 263 МЛН
Colorful Pasta Painting for Fun Times! 🍝 🎨
00:29
La La Learn
Рет қаралды 308 МЛН
For Loops in R
34:43
Biodiversity Data Science
Рет қаралды 11 М.
Advanced functional programming R tricks to feel like a hacker
20:39
Bruno Rodrigues
Рет қаралды 9 М.
I regret doing this...
1:20:07
Tsoding Daily
Рет қаралды 82 М.
Intro to the Tidyverse
1:01:39
Thomas Mock
Рет қаралды 28 М.
Why you should(n't) care about Monads if you're an R programmer
33:20
Bruno Rodrigues
Рет қаралды 2 М.
Why you need to use lists more in R
10:24
Andres Quintero
Рет қаралды 1,4 М.
TidyTuesday: A Brief Overview of Functional Programming with Purrr
44:04
"The Joy of Functional Programming (for Data Science)" with Hadley Wickham
59:58
Association for Computing Machinery (ACM)
Рет қаралды 28 М.
Loops, Functions, and the Apply Family | R Tutorial (2020)
18:45
RichardOnData
Рет қаралды 5 М.
When u fight over the armrest
00:41
Adam W
Рет қаралды 11 МЛН