case_when() - a vectorized if_else()

Publicado em: 04 Outubro 2022
no canal de: John Little
179
9

code available at https://github.com/libjohn/workshop_r...
full video series -- playlist --    • Import multiple files from a local file sy...  

Using the case-study of data cleaning, this modular video series will demonstrate iteration with purrr::map() and custom functions while also showing several Tidyverse tips and tricks. This individual video (# 2-B) in the series presents the case_when function. case_when() is a specialized and vectorized function that makes it convenient to code for compund if_else logic. Each #IterateFunctionsR video will become progressively more fluent, using building-blocks to present intermediate data manipulation techniques in R and the Tidyverse.

By the end of the series you'll learn how to use the purrr package, a very convenient package in support of iterating over list-columns and nested data frames. purrr::map() iteration is often more convenient and efficient than a For-loop. You'll also learn how to compose custom functions in R.
since R is a functional programming language, composing your own custom functions can increase your fluency as an R coder.

Contents:
0:00 - introduction
0:55 - if_else()
1:36 - case_when()

Materials available at https://github.com/libjohn/workshop_r...
More Rfun at https://Rfun.library.duke.edu/
Part of the CDVS Workshop Series: http://library.duke.edu/data/


Nesta página do site você pode assistir ao vídeo on-line case_when() - a vectorized if_else() duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário John Little 04 Outubro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 179 vezes e gostou 9 espectadores. Boa visualização!