▶️ Tidyverse tips in R (my top 18 tips & tricks) - th-cam.com/video/ZM04jn95YP0/w-d-xo.html 🎉 *Subscribe* if you want more videos like this! - th-cam.com/channels/b5aI-GwJm3ZxlwtCsLu78Q.html 😃 *Comment* below to share which tricks you liked the most!! I figured out what was going on with the warning at 11:12. Hint: filter(is.na(start_date)) to look at the NA start_dates (rather than !is.na(start_date) which selects rows which have a correctly parsed start_date). You'll see that startday, startmonth, and startyear are empty (NA) for those rows.
Tom, Thanks for this great tutorial! Relatively new to R and was looking to familiarise myself with packages that would be useful for financial analysis, and found your channel. Great work!
I have been watching your videos since day one, and they have really helped me. Thanks for sharing these absolute gems! If you could do a video talking about text analysis or a walkthrough, that'd be great!
Thanks, Bhabishya! I'm glad they are helpful for you! I'll make a video in the next couple of weeks focusing on text analysis with a real dataset. It will be fun.
@@tomhenry-datasciencewithr6047 I am excited and looking forward to it! This might be too much to ask for, but is there a way that I can get in touch with you? I am an aspiring data scientist, and I feel like there's a lot to learn at this point to get there. I would be really grateful if you could list out some things that I might wanna do to get there or mentor me throughout this journey. FYI: Right now, I am in my senior year in college with a good amount of research experience, and I like to think that I have a decent R experience as well. But, yeah, no pressures!
Tom, Nice summary of interesting packages. I have been using janitor for a while and it is a life saver. tsibble looks interesting but I have heard that the padr package does similar things and might work better for filling in missing dates. The description of the package claims that it is better than lubridate in that regard. Another package I use quite a bit and love is flextable. It produces great looking output and works with the tidyverse. Finally, a collection of packages that works well with imports and finding your 'path' are rio, pacman and here. Thanks!
Hi Tom, thanks for the tips. I will like a complete tips on the tsibble package. Can this package be used to extract and plot only summer months for time-series datasets of 10 years?
Hi Tom, thank you for this. for using tidylog I need to add tidylog() at the end of code chain? somehow if I don't add tidylog() at the end I don't see any transformation steps
Did you run this line near the top of your code? library(tidylog) You may also need to use these options where appropriate, but normally putting library(tidylog) at the top of your code is fine: # turn logging-output on options("tidylog.display" = NULL) # turn logging-output off options("tidylog.display" = list()) (more details on those here: rdrr.io/github/elbersb/tidylog/f/README.Rmd) One possibility is that another package you are using is overriding tidylog, but that is unlikely.
@@tomhenry-datasciencewithr6047 thank you Tom for the prompt reply Ll give it a go Any interesting packages, add-ins and/or tips using R? A video is due:) Appreciate the efforts, they really make a difference
thank you for this. wonder if you could help me out with presentations. I would like to produce a customised presentation and apparently the best approach would be by using officer package, the challenge is splitting tables automatically based on allotted space and size of content. Got any idea how to do it???
Thank you Tom for sharing these tips, really these packages are very useful but they did not take their right to fame. For the lubridate example, you could have used: make_date() function as follow: protests_simplified % select(country, startday, startmonth, startyear) %>% mutate(start_date = make_date(startyear, startmonth, startday))
There are some different ways to do it - if you install `vroom` package, you can run something like this: library(tidyverse) library(vroom) library(janitor) library(fs) # also check out the `here` package for a good way to find the working directory vroom(dir_ls("*.csv")) %>% clean_names() %>% select(col_1, col_2, col_3, ......) %>% distinct() (assumes all your csv files have the same format). What do your csv files look like? If your columns have mixed types etc. or the files are very short, the procedure would need to be changed a bit to make sure all the types get picked up accurately.
@@tomhenry-datasciencewithr6047 Hi there! thanks for the answer. Yeah! They have the same format and each column has values with the same types (doubles). And some are big like 65000 lines and 8 columns.
@@paulosergioschlogl9550 Fantastic. In that case, the vroom() technique will work well. Or, if you want to use the standard tidyverse packages, you can get the list of files like so: library(tidyverse) file_list % vroom(delim = "|") # because vroom takes a list of files all_data_CLEANED % janitor::clean_names() %>% select(col_1, col_2, col_3, ...) all_data_CLEANED %>% write_delim("final_csv.csv", delim = "|", na = "")
▶️ Tidyverse tips in R (my top 18 tips & tricks) - th-cam.com/video/ZM04jn95YP0/w-d-xo.html
🎉 *Subscribe* if you want more videos like this! - th-cam.com/channels/b5aI-GwJm3ZxlwtCsLu78Q.html
😃 *Comment* below to share which tricks you liked the most!!
I figured out what was going on with the warning at 11:12.
Hint: filter(is.na(start_date)) to look at the NA start_dates (rather than !is.na(start_date) which selects rows which have a correctly parsed start_date). You'll see that startday, startmonth, and startyear are empty (NA) for those rows.
Ive been working with R for like 5 years now and this is extremely helpful. I need to keep up to date with packages.
Really glad it was helpful! So many R packages!
Tom, it would be great if you did a video focusing on tsibble. Thanks.
Will do!
I agree! That would be really useful. Thanks for the great video!
Thank you mr Tom for the great job. It is deep and refreshing. God bless you and your lovely family.
I can't believe this video only has 545 likes and 13K views...this is awesome!
Great video TOM even with R crashing and coming on it was easy to follow, concise and to the point.
Thank you for sharing these 7 underrated R packages.
My pleasure!!
tidylog is an absolute game changer! Thanks for sharing these hidden gems!
It really is! Glad you enjoyed! :)
Tom, Thanks for this great tutorial! Relatively new to R and was looking to familiarise myself with packages that would be useful for financial analysis, and found your channel. Great work!
Thanks very much for this great video, I loved the way you explained how to use these packages very simply. Well done
Glad it was helpful!
I have been watching your videos since day one, and they have really helped me. Thanks for sharing these absolute gems! If you could do a video talking about text analysis or a walkthrough, that'd be great!
Thanks, Bhabishya! I'm glad they are helpful for you! I'll make a video in the next couple of weeks focusing on text analysis with a real dataset. It will be fun.
@@tomhenry-datasciencewithr6047 I am excited and looking forward to it!
This might be too much to ask for, but is there a way that I can get in touch with you? I am an aspiring data scientist, and I feel like there's a lot to learn at this point to get there. I would be really grateful if you could list out some things that I might wanna do to get there or mentor me throughout this journey. FYI: Right now, I am in my senior year in college with a good amount of research experience, and I like to think that I have a decent R experience as well. But, yeah, no pressures!
thank u so much, Tom.
love tsibble and tidytext, never head of them before. would like more such content about text mining
Great video - short, clear and showing stumbles is helpful
Tom,
Nice summary of interesting packages. I have been using janitor for a while and it is a life saver. tsibble looks interesting but I have heard that the padr package does similar things and might work better for filling in missing dates. The description of the package claims that it is better than lubridate in that regard. Another package I use quite a bit and love is flextable. It produces great looking output and works with the tidyverse. Finally, a collection of packages that works well with imports and finding your 'path' are rio, pacman and here. Thanks!
Hi Tom, thanks for the tips. I will like a complete tips on the tsibble package. Can this package be used to extract and plot only summer months for time-series datasets of 10 years?
Hi Tom,
thank you for this. for using tidylog I need to add tidylog() at the end of code chain?
somehow if I don't add tidylog() at the end I don't see any transformation steps
Did you run this line near the top of your code?
library(tidylog)
You may also need to use these options where appropriate, but normally putting library(tidylog) at the top of your code is fine:
# turn logging-output on
options("tidylog.display" = NULL)
# turn logging-output off
options("tidylog.display" = list())
(more details on those here: rdrr.io/github/elbersb/tidylog/f/README.Rmd)
One possibility is that another package you are using is overriding tidylog, but that is unlikely.
@@tomhenry-datasciencewithr6047 thank you Tom for the prompt reply
Ll give it a go
Any interesting packages, add-ins and/or tips using R? A video is due:)
Appreciate the efforts, they really make a difference
Tidytext tutorial please. Now I am highly interested.
Just found this gem! Thank you so much for this! Very useful!
You're very welcome!
very good, thank you for sharing, and thank you also for sharing the mistakes!
My pleasure!
Thanks. Tidylog is great addition to my workload.
Tidylog is fantastic!
Very helpful! Thank you!
thank you for this. wonder if you could help me out with presentations. I would like to produce a customised presentation and apparently the best approach would be by using officer package, the challenge is splitting tables automatically based on allotted space and size of content. Got any idea how to do it???
I am lucky I came across your channel! Thank you.
You are so welcome!
Thank you Tom for sharing these tips, really these packages are very useful but they did not take their right to fame.
For the lubridate example, you could have used: make_date() function as follow:
protests_simplified %
select(country, startday, startmonth, startyear) %>%
mutate(start_date = make_date(startyear, startmonth, startday))
make_date() is a fantastic function!
A very nice user-friendly explanation!
Glad you think so!
Pls consider making some content on data.table. Package does not get enough love.
This video proves, how unstable and shyyt R is to be honest. Crashes, errors etc. this is what im facing every single day at work. Good video though!
Hi there...any way to work with multiple csv files at once to select only few columns and create a final csv?
There are some different ways to do it - if you install `vroom` package, you can run something like this:
library(tidyverse)
library(vroom)
library(janitor)
library(fs)
# also check out the `here` package for a good way to find the working directory
vroom(dir_ls("*.csv")) %>%
clean_names() %>%
select(col_1, col_2, col_3, ......) %>%
distinct()
(assumes all your csv files have the same format).
What do your csv files look like? If your columns have mixed types etc. or the files are very short, the procedure would need to be changed a bit to make sure all the types get picked up accurately.
@@tomhenry-datasciencewithr6047 Hi there! thanks for the answer. Yeah! They have the same format and each column has values with the same types (doubles). And some are big like 65000 lines and 8 columns.
@@paulosergioschlogl9550 Fantastic. In that case, the vroom() technique will work well. Or, if you want to use the standard tidyverse packages, you can get the list of files like so:
library(tidyverse)
file_list % vroom(delim = "|")
# because vroom takes a list of files
all_data_CLEANED %
janitor::clean_names() %>%
select(col_1, col_2, col_3, ...)
all_data_CLEANED %>%
write_delim("final_csv.csv", delim = "|", na = "")
@@tomhenry-datasciencewithr6047 Thank you very much Tom. That is awesome.8)
Thanks for sharing
Helpfully
Data.table & quanteda would be great.
make_date renders str_c a waste of time in lubridate walk through
need your email sir
Excellent! tidytext looks very interesting.
reminded to tidylog nice one