9:34 what's the benefit of spring over glue? Glue is also consistent with python's convention of using fstrings.. same syntax
@rappa7535 күн бұрын
Sprintf also gives you formatting with these quick %-sign abbreviations. Ultimately it's only a matter of preference whether you want to use glue or sprintf
@rappa7536 күн бұрын
If you enjoyed this video and want to level up your R skills even further, check out my latest video courses: 📍Data Cleaning Master Class at data-cleaning.albert-rapp.de/ 📍Insightful Data Visualizations for "Uncreative" R Users at arapp.thinkific.com/courses/insightful-data-visualizations-for-uncreative-r-users
@ryanharrison89868 күн бұрын
Another excellent video, Albert! Thank you!
@rappa7537 күн бұрын
@@ryanharrison8986 thank you, Ryan ❤️
@asolisca11 күн бұрын
I had never clicked so hard and so quickly into a coding tutorial. Many, many thanks Dr. Rapp!
@rappa75311 күн бұрын
Awesome! Really glad that you enjoy this content. With the more technical stuff, there's always a risk of doing a video that flops so I'm glad this wasn't the case here ☺
@djangoworldwide792512 күн бұрын
It probably took me a week of failed actions to fix it. I now automated the upload of every rweekly highlights podcast in a nice CSV format, with links and transcripts.
@rappa75312 күн бұрын
Nice! 🤗
@k5555-b4f12 күн бұрын
first time i actually ˆreduceˆ (no pun intended kapa) the playback speed ha
@k5555-b4f12 күн бұрын
nice work ! dumb question but assuming git actions and thus needing a machine to be spun will not be able to run anything in a VPN setting/environment (in my work) unless that machine is somehow whitelisted first right ? (the r script pretty much always pulls various inputs from a share drive)
@rappa75312 күн бұрын
Yeah exactly. If the source data isn't publicly available (might include authentication via token), then the machine of your GH action will have no way of accessing it. Not sure if it's possible/wise to whitelist GitHub actions machines. Typically, companies who do this have a private instance of GitHub or some other tool like Jenkins.
@transportation-talk12 күн бұрын
Really well done. Great work as always. Thanks!
@rappa75312 күн бұрын
You're welcome 🥳
@DM-py7pj12 күн бұрын
Thank you. Why did you not have to specify the publication target as Netlify in the actions YAML, please?
@rappa75312 күн бұрын
You're welcome. That's a great question. And the reason why this wasn't necessary is because after the first manual publishing Quarto saves this information in a _publish.yml file which is then also in the repo and is used in subsequent publishs.
@simonramirezgarces12 күн бұрын
Great content! Thanks for sharing
@rappa75312 күн бұрын
Glad that you enjoyed it! :)
@rappa75314 күн бұрын
If you enjoyed this video and want to level up your R skills even further, check out my latest video courses: 📍Data Cleaning Master Class at data-cleaning.albert-rapp.de/ 📍Insightful Data Visualizations for "Uncreative" R Users at arapp.thinkific.com/courses/insightful-data-visualizations-for-uncreative-r-users
@onkar765115 күн бұрын
Super-duper useful video, thank you, Albert, for your amazing contribution to the #rstats community.
@rappa75311 күн бұрын
You're welcome. I'm just glad that found this video useful 😊
@daviddehoog926918 күн бұрын
Thanks for the helpful guide! Could you please show, in a future video, how to deal with new versions of packages becoming available? For example, if I had a Quarto document that used an old version of a package, and I want to upgrade it to use a feature in the new package? I’ve done something similar with python and venv, so would be interested to see how it could work in R with renv. I think it was really helpful for me to understand why virtual environments and lock files are important and powerful - especially for reproducibility and for deployment in different environments!
@rappa75311 күн бұрын
Glad you liked it :) And also thanks for mentioning this great use case. Really, I should have thought about it in the video. You can update packages with the update() function: rstudio.github.io/renv/reference/update.html
@djangoworldwide792519 күн бұрын
5:15 I would introduce libpath to demonstrate this idea.. great vid. Renv is Great
@rappa75319 күн бұрын
Ahh you're right. Clearly I missed an opportunity there 😅
@DM-py7pj19 күн бұрын
I thought renv doesn’t have multiple copies of same version packages (across projects). Rather, if it is already installed then a new project requiring that package (and specific version) links to that pre-installed version? So, there could be something like an renv store/library as well as a global? Trying to understand why packages existing in global aren’t linked to unless different version
@rappa75319 күн бұрын
@@DM-py7pj interesting 😯 I thought it's one standalone library per project. Possibly renv has some optimization going on here 🤔
@DM-py7pj19 күн бұрын
@ I didn’t get it quite right. Quote from docs: If you use renv for multiple projects, you’ll have multiple libraries, meaning that you’ll often need to install the same package in multiple places. It would be annoying if you had to download (or worse, compile) the package repeatedly, so renv uses a package cache. That means you only ever have to download and install a package once, and for each subsequent install, renv will just add a link from the project library to the global cache. You can learn more about the cache in vignette("package-install").
@rappa75318 күн бұрын
@@DM-py7pj Pretty cool optimization
@rappa75320 күн бұрын
If you enjoyed this video and want to level up your R skills even further, check out my latest video courses: 📍Data Cleaning Master Class at data-cleaning.albert-rapp.de/ 📍Insightful Data Visualizations for "Uncreative" R Users at arapp.thinkific.com/courses/insightful-data-visualizations-for-uncreative-r-users
@transportation-talk21 күн бұрын
You're awesome! Thank you for your hard work.
@rappa75321 күн бұрын
You're welcome. I'm just glad that this is appreciated so much 😊
@enocharthur432224 күн бұрын
Amazing...finaallllyyyy... tutorials on PowerPoint. This is very important. We need more tutorials on this
@rappa75323 күн бұрын
Glad that you're so excited about this 🤗
@enocharthur432221 күн бұрын
@@rappa753Thank you so much. Please please please do more videos on R and PowerPoint
@blaisepascal390525 күн бұрын
Really nice! But why not use Quarto to export to pptx?
@rappa75325 күн бұрын
That's possible too but it's limited to what Quarto or rather more appropriately what pandoc can do. And in that sense Pandoc is often a bottleneck when it comes to Office files. That's why I usually go with {officer} instead. Also, I don't think the Quarto docs are detailled enough when it comes to pptx.
@blaisepascal390525 күн бұрын
@rappa753 Thank you for your nice and precise answer!
@rappa75325 күн бұрын
@@blaisepascal3905 you're very welcome. I'm always happy to help 🤗
@djangoworldwide792526 күн бұрын
Next big thing: integration of ggiraph with pptx, so you get interactivity within the slide!
@rappa75325 күн бұрын
Would be cool but I don't think pptx has a built-in JavaScript functionality to handle the interactivity 🤔
@taiwankyh26 күн бұрын
thanks so much
@rappa75326 күн бұрын
You're welcome! 😊
@rappa75327 күн бұрын
If you enjoyed this video and want to level up your R skills even further, check out my latest video courses: 📍Data Cleaning Master Class at data-cleaning.albert-rapp.de/ 📍Insightful Data Visualizations for "Uncreative" R Users at arapp.thinkific.com/courses/insightful-data-visualizations-for-uncreative-r-users
@andregouveia4051Ай бұрын
Hi Albert! Are you going to teach (show us hot to do the initial table about Germany that you showed at the brginning?? Could you make a series about that table, please?? I'm this series could be valueable for most of us (at least for me will be! 😅). Congrats for your awesome work 😉
@rappa753Ай бұрын
The video will come in the next few weeks. I've already recorded it but haven't gotten around to the editing part yet 😊
@djangoworldwide7925Ай бұрын
Theres a meme with levels of awesomeness. Integrating classes in cli:: in your error handling is second to top level, which is understanding what the user *wanted* to do and suggest the correct code, as they often do with "n" or ".n" and in depcracted methods in tidyverse
@rappa753Ай бұрын
Oh I love it when that happens and the error just tells me the solution 😍
@djangoworldwide7925Ай бұрын
Does hadley even write in R? Its all c and c++ under the mighty tidy hood 😅
@rappa753Ай бұрын
Good question. Haven't thought about that 😂
@carvalhoribeiroАй бұрын
Great explanation. Thanks for sharing this
@rappa753Ай бұрын
You're welcome. Happy to help ☺
@rappa753Ай бұрын
Thank you for watching my latest video. ♥ If you enjoyed this video, I'm sure you're also going to love my Data Cleaning Master Class. Clean your data and find insights much faster at data-cleaning.albert-rapp.de/
@haraldurkarlsson1147Ай бұрын
I prefer the more explict expressions rather than short-hand because it may be difficult for someone (inlcuding one self) to interpret the code down the line. I like the ~.x versions e.g. map_dbl(coeffs, ~.x[1]) but I suppose with \(x) x[1] things are clear. Lastly I would have liked to have seen r-squared and the p value for the slope.
@rappa753Ай бұрын
Yeah I write \(x) almost instinctively so I never use the short-hand either 😃 you can add additional map calls to extract these stats from the lm object as well 😊
@enocharthur4322Ай бұрын
A simpler example would have drum home the point faster. Great work though
@rappa753Ай бұрын
I like to start with an elaborate example to show people what's possible first (with explanations of course) 🤗 the simpler example is also available in the video
@albertocabrera4297Ай бұрын
Your KZbin lesson could also be used to understand the powerful concept of multilevel modeling regression (MLM), which rests on nested data. I imagine your map( ) could be used to pull out the estimates generated by MLM. Thanks again for another superb lesson.
@rappa753Ай бұрын
Glad you like it 🤗 and yeah the map() functions can help with loads of analyses 🥳
@adan8657Ай бұрын
Great thanks. And cool new logo!
@rappa753Ай бұрын
Thank you. That's exactly what I wanted to hear ❤️🤗
@thespaniardinmeАй бұрын
Keep doing the good work, Sir. Always a good feeling when I get a notification that a new video has been uploaded on your channel, Dr. Can you kindly consider doing a video on Web scraping, sir. There are none to very few resources on things like async web scraping using R (be it using httr2, mirai, async). As always, thank you for your good work, sir!
@rappa753Ай бұрын
Thank you, I'm Happy to hear that 🤗 As for your topics, I'll add it to the backlog. Have you checked out my tutorial on {httr2} and {rvest} yet? 🤔
@thespaniardinmeАй бұрын
@@rappa753 thank you so much, Dr. I have indeed watched both of them. My first introduction to httr2 was actually by way of your video! I had not even known that the package existed prior to that, really.
@rappa753Ай бұрын
Awesome! It's always delightful to hear that my videos made an impact. Thank you for sharing that. ♥️
@ambhat3953Ай бұрын
+1
@rappa753Ай бұрын
Thank you for watching my latest video. ♥ If you enjoyed this video, I'm sure you're also going to love my Data Cleaning Master Class. Clean your data and find insights much faster at data-cleaning.albert-rapp.de/
@siddheshpujari25Ай бұрын
Thank you for exposing me to this library. Huge time saver. Will start implementing this right away
@rappa753Ай бұрын
Awesome! Happy to hear that :)
@enocharthur4322Ай бұрын
We need more tutorials on the officeR Package. Very limited tutorials on youtube
@rappa753Ай бұрын
Agreed. A Powerpoint tutorial is also on its way 🥳
@reem19681Ай бұрын
Excellent, Is it possible to share the code?
@sanderellphillipАй бұрын
Great video! I wonder what would be the benefit of using this package to make a Word doc as opposed to using Quarto and rendering as a Word doc?
@rappa753Ай бұрын
More granular customization possibilities. With Quarto you have to go through pandoc which has limited Word processing features. But if you find that for your use case, Quarto has all that you need, then you can just as easily use that :)
@ferrocenАй бұрын
Thanks for this tutorial ❤ Do you think it would be possible to use a template and the replacement functions to create a serial letter? I think „map“ could work, but then I will have a file for each letter. I already tried it with knittr and quarto but failed 😂 Thanks again 👍🏻
@rappa753Ай бұрын
Not quite sure I understand the question correctly. You don't want to have separate files per letter? All letters in one Word doc on separate pages?
@ferrocenАй бұрын
@@rappa753yes exactly. Like when you use the serial letter function in Word. At the moment I prepare my data with R, export it as csv and then use it with the serial letter function in Word. Now I thought that it would be nice to do everthing in R 😊
@JollyRoger183Ай бұрын
Unrealted question but how do you set up RStudio in a way to get these red-yellow-green squares that visualize the intendations?
@rappa753Ай бұрын
It's the rainbow indent setting. I've described them at kzbin.info/www/bejne/jnm3YqBjgbCHjLs
@DM-py7pjАй бұрын
Please do a qmd to PowerPoint, using custom PowerPoint template. Include the setting up PowerPoint and qmd parts. Company/custom styling etc.
@rappa753Ай бұрын
I find the Quarto to PowerPoint documentation hard to decipher. But I'll show you how to create pptx files with custom templates using the {officer} package soon :)
@ambhat3953Ай бұрын
Need to try this, I always copy pasted the charts to word doc
@rappa753Ай бұрын
Let me know how it goes 😊 copy and paste is still a quick method for one-offs. But for repeated documents this will become tedious quite fast.
@djangoworldwide7925Ай бұрын
This is great, but for all of you students or hobbiests, youd wish to have such a nice data in your actual job. as a dummy example to get to know stringr and tidyr, its a nice tutorial :)
@rappa753Ай бұрын
Yeah this is a bit easier than what you'd see in the real world but I've had a similar use case recently at work that didn't involve much harder things. Getting started is always the hardest 😁
@mbmathematicsacademic7038Ай бұрын
this is crazy,I watched first 10 mins without coding, which shows how you explain everything so easy
@rappa7532 ай бұрын
Thank you for watching my latest video. ♥ If you enjoyed this video, I'm sure you're also going to love my Data Cleaning Master Class. Clean your data and find insights much faster at data-cleaning.albert-rapp.de/
@nithin.m2675Ай бұрын
hi albert. nice video. Do you think we can use this in quarto? i mean use YAML parameters for replacement words like date?
@sunrunnerke2 ай бұрын
Thank you very much for the tutorial. However, it seems that my density plot from one categroy is overlapping with the dotplot from another. Is there a way to fix this?
@rappa7532 ай бұрын
You're welcome :) You should fine what you need at 3:20
@sunrunnerke2 ай бұрын
@@rappa753 Thank you .. I missed that
@ThomasJacobsen-h8d2 ай бұрын
thanks a lot. as usual a great video. yes, glue_sql is really one of the best functions to work with databases
@mignacio792 ай бұрын
Very nice tips and details on the use of glue and SQL query!!! Thanks for explaining them. They are a bit tricky. It could have been quite a while until I figured out where the error is. What a nice optimized approach you used for this part of the filtering. Great video Albert!
@rappa7532 ай бұрын
Nice! I'm glad that you find this so useful 🤗🥳
@rayflyers2 ай бұрын
What a timely video. I'm working on a project using Duck DB from R. I know that Duck DB supports enums, nested data, and pivots, but I have no idea how to use them with DBI or dplyr. I'll put examples in the replies.
@rayflyers2 ай бұрын
Example #1: Nested data. Count how many people have data across multiple years for each state (I'm American). My dplyr code looks like this: my_data |> distinct(person_id, state, year) |> summarize( ids = list(person_id), ids_in_this_year = n(), .by = c(state, year) ) |> mutate( ids_in_next_year = map2_int(ids, lead(ids), \(x, y) sum(x %in% y)), ids_in_last_year = map2_int(ids, lag(ids), \(x, y) sum(x %in% y)), .by = state )
@rappa7532 ай бұрын
Have you seen the {duckplyer} package yet? 🤔
@rayflyers2 ай бұрын
Example 2: Convert numerical csv data into factors/enums. The data come in as 1, 2, or 99 and need to have the labels "Yes," "No," and "Unknown." Again, I have a dplyr example, but I'm not sure how to do this conversion with database enums. my_data |> mutate( x1 = factor(x1, levels = c(1, 2, 99), labels = c("Yes", "No", "Unknown") )
@rayflyers2 ай бұрын
Example 3: Pivots. Trying to use dbplyr just tells me there's no method for pivoting even though I know Duck DB has pivots con |> tbl("my_data") |> select(state, year, ids_in_this_year) |> pivot_wider( names_from = state, values_from = ids_in_this_year )
@rayflyers2 ай бұрын
@@rappa753 I have heard of duckplyr. My understanding is that it works with data in memory. My data are larger than memory, so they have to sit in a duckdb file.
@user-sq9wp2ge4h2 ай бұрын
In my first year of data science i went through pain of writing a parser, build with paste XD this would have been easier. Although some time later i found out about the dbplyr package, which literally converts tidyverse syntax into sql syntax. quite nice if the queries aren't too complex
@rappa7532 ай бұрын
Yeah dbplyr is nice but it can still be useful to use a bit of SQL manually with glue_sql(). But kudos for building a parser 🥳
@rappa7532 ай бұрын
Thank you for watching my latest video. ♥ If you liked this video, I'm sure you're also going to love my Data Cleaning Master Class. Clean your data and find insights much faster at data-cleaning.albert-rapp.de/