Get my FREE cheat sheets for R programming and statistics (including transcripts of these lessons) here: www.learnmore365.com/pages/membership-r-programming-data-visualization-and-research-methods
@EmersonScheidegger2 ай бұрын
Your content submission is amazing!!! please, keep going!
@RProgramming101Ай бұрын
wow - thanks for the lovely comment
@2012Opus4 ай бұрын
Thank you! The only confusing this the final argument: TRUE ~. This is a bit counterintuitive.....
@neytchi87094 ай бұрын
Your content submission is rocket!
@RProgramming1014 ай бұрын
Thanks.. :)
@RUJedi4 ай бұрын
Fantastic video as always. However, why use if_else() from dplyr when there is ifelse() from base R? Sure, if_else() has an extra argument option for processing missing values, that could still be handled with the base R version without much effort too. Sometimes I think the Tidyverse over-complicates code by offering more code choices when the base R version is equivalent or nearly as good.
@maizeblue6993 ай бұрын
I've had issues with if_else() being more restrictive with outputs and have switched to ifelse(). Let's say you want to output either a character or a number depending on your condition. For example, I want to convert all my 0 values (considering them as below LOQ) in variable_1 to "NA" and leave the rest as numeric values so I ca then use "na.exclude()": mutate(variable_2 = if_else(variable_1 == 0, "NA", variable_2) will give me an error. This same code works if I use "ifelse()" instead. I was initially using embedded if else statements and eventually realized case_when is a lot more compact.
@ampauls4 ай бұрын
Fantastic. I'm curious then, if you like the table you've made, and want to use it in a paper or presentation, how do you export that? Is it simply copy and paste, or is there a command we can use to export the table?
@RProgramming1014 ай бұрын
oh there is a way of getting the tables out - I'll do a video all about it soon (hard to get into the details here in the comments)
@ampauls4 ай бұрын
@@RProgramming101 fantastic. Appreciate it!
@jackymo8204 ай бұрын
In the case_when example, both FALSE actions (when the 2 conditions were not met) were the same (putting original hair colour) what if the FALSE action of the 2 conditions is different?
@NattyGism4 ай бұрын
🎉 always love every post and always looking forward to more. Thank Greg# R_ Super hero 🦸🏽♂️ Very helpful.