Even though I know a lot of these functions, there is always something to learn in your videos. Thank you.
@Riffomonas2 жыл бұрын
My pleasure! Thanks for watching
@bhaskartigp2 жыл бұрын
One simple way to select multiple locations is using % in% . (location %in% c(“ United States “ , “ Canada “)
@Riffomonas2 жыл бұрын
Thanks. Yep. We get that in another episode. Many ways to do the same thing in R!
@Riffomonas3 жыл бұрын
Want to improve your R skills? Check out my upcoming R workshops that are all taught via Zoom riffomonas.org/workshops/ and my weekly newsletter where you can get practice exercises riffomonas.org
@enrico2 Жыл бұрын
thank you, very useful!!
@cleoniceandradeholanda57572 жыл бұрын
And what if I want to filter the last/max values of some countries that I have selected? for instance, I selected USA, UK, and FR. FR doesn't have day 2020-01-28 but has day 27. All the others have 28. How to make an object that filters USA and UK's values of day 28 and FR day 27?
@Riffomonas2 жыл бұрын
Maybe try slice_max on the date column after grouping by country
@cleoniceandradeholanda57572 жыл бұрын
@@Riffomonas Wow cool! I didn't know that one! It Worked! I used the slice to the people_vacinated column and came to the dates that had no NA value!!! Thank you so much!
@tommy.h.descartes3 жыл бұрын
Hey I have some issues with the rename function. Gives me an error about plyr vs dplyr. Any help?
@Riffomonas3 жыл бұрын
Hi Tommy - sorry, I'm not familiar with that error message. With dplyr's rename, it would be rename(dataframe, new_name=old_name)
@tommy.h.descartes3 жыл бұрын
@@Riffomonas thanks much. I have really been enjoying you videos.
@bulletkip2 жыл бұрын
@@tommy.h.descartes sometimes if you load plyr after dplyr in your script, you will get that error.
@bulletkip2 жыл бұрын
if you have to get around it, you can force it by calling dplyr directly: dplyr::rename(dataframe, new_name=old_name)
@gustavgabrielsen84592 жыл бұрын
How do i filter two rows?
@Riffomonas2 жыл бұрын
Sorry, I'm not sure what you mean. Do you want to get back two rows? If that's what you mean, then within a single filter function, I'd create one statement to get one of the rows back and then another statment to get the other back. Then I'd connect them with an or operator (i.e., |) like ... filter(statement_1 | statement_2)