Using dplyr's slice and arrange functions in R to order and pick rows from a data frame (CC162)

  Рет қаралды 2,278

Riffomonas Project

Riffomonas Project

Күн бұрын

Пікірлер: 12
@patrickrafidimanantsoa2297
@patrickrafidimanantsoa2297 2 жыл бұрын
Thanks so much! I'm learning new things every day. 🙏
@Riffomonas
@Riffomonas 2 жыл бұрын
My pleasure! Thanks for watching Patrick
@ShawnJanzen
@ShawnJanzen 3 жыл бұрын
Great video & series! Nice tease at the very end. I'll watch the next one either way, but are you planning to use something like: country_vector
@Riffomonas
@Riffomonas 3 жыл бұрын
Great thinking! I’ve done that in other contexts but I’m going to do something different here since I have a data frame with the countries I want (plus I like trying different things). I’m going to use a join to effectively filter the data. That will be in next Thursday’s episode.
@yeokcmark
@yeokcmark Жыл бұрын
Thank you for your video. I was looking for a way to present Top/Bottom XX of my data and now I've found it!
@haraldurkarlsson1147
@haraldurkarlsson1147 7 ай бұрын
What was it? Did you find headTail() from the pysch package?
@marcoarizapana2210
@marcoarizapana2210 3 жыл бұрын
lo máximo, muchas gracias por su ayuda. Saludos desde Huanta - Perú
@Riffomonas
@Riffomonas 3 жыл бұрын
De nada! I'm glad you watched :)
@Riffomonas
@Riffomonas 3 жыл бұрын
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
@haraldurkarlsson1147
@haraldurkarlsson1147 11 ай бұрын
Pat, Your videos are always informative and useful. I frequently visit your site if I am stumped and can't seem to make progress. But I also like to "pay it forward" when I can and share some insight or trick I have learned. Like you I work on entire projects not just snippets of code. Recently, while importing a messy text file, I came across an interesting problem. What to do when you have multiple headers in a table buried deep in the file. After figure out how to remove a bunch of meta-data on the top and extraneous stuff at the bottom I though I was done. All I needed to do was to put a new header (variable names) using the first two rows of the cleaned table and then remove those two rows. So why not just slice()? I know df[-2, ] works but that looks ugly and as a tidyverse type of guy slice() was it for me. But slice() did not work. I could not remove the top two rows! Unless I did df |> slice(-1) |> slice(-1). Have you or anyone else been able to use slice for this? Or is there another tidyverse function for this? Thanks, H
@Riffomonas
@Riffomonas 7 ай бұрын
Thanks! I think there’s a skip argument in the read_ functions.
@haraldurkarlsson1147
@haraldurkarlsson1147 7 ай бұрын
Someone here was looking for a function that combines head() and tail(). I have seen some custom functions but there is no need for that. It turns out that the psych package (its full of all sorts of goodies) has a function called headTail().
Using dplyr's filter function to pick rows from a data frame in R (CC161)
18:02
Triple kill😹
00:18
GG Animation
Рет қаралды 18 МЛН
Try Not To Laugh 😅 the Best of BoxtoxTv 👌
00:18
boxtoxtv
Рет қаралды 7 МЛН
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 195 МЛН
the balloon deflated while it was flying #tiktok
00:19
Анастасия Тарасова
Рет қаралды 36 МЛН
Using the dplyr lag and lead function to find the length of drought (CC245)
22:44
Ukraine-Russia talks in Belarus / Trump's condition for Putin
12:10
Scraping weather data from the internet with R and the tidyverse (CC231)
23:09
Sort Data in R | Arrange, sort and order function in R
13:57
The Data Hall
Рет қаралды 1,2 М.
How to add text to a figure using the R ggplot2 package with geom_text (CC149)
18:39
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
pixegami
Рет қаралды 284 М.
Triple kill😹
00:18
GG Animation
Рет қаралды 18 МЛН