Tidyr::pivot_wider() for reshaping data supersedeĭplyr::across() for working across columns supersedes scoped verbs such asĭplyr::slice_sample() with n and prop arguments supersedes Superseded indicates that there is a known better alternative for the function, but it’s not going away. You should avoid teaching functions that are deprecated and correct their usage in your students’ code by suggesting the preferred alternative. Tidyr::nest() the new argument new_col makes the former. Arguments to functions can also be deprecated, e.g., in Tibble::data_frame(), with the preferred alternative Very important functions that become deprecated might next be defunct, which means that function continues to exist but the deprecation warning turns into an error. Generally functions will first be soft deprecated and then deprecated. If a function is noted as deprecated, this means a better alternative is available and this function is scheduled for removal. Teaching tip: feel free to teach any stable functions, they’re here to stay for the long run! This is the default state for most functions in the tidyverse and hence the badge is generally not shown. If breaking changes are needed, they will occur gradually. Stable indicates that breaking changes will be avoided where possible, and they’re only made if the long term benefit of such a change exceeds the short term pain of changing existing code. Let’s discuss each of these stages in detail, along with recommendations on how you might consider them in the context of teaching: The diagram below depicts the lifecycle stages of functions and packages in the tidyverse. Being aware of the lifecycle stages (and their associated badges) can be helpful as you review and revise your teaching materials or as you consider incorporating new tooling into your teaching. The lifecycle stages are a useful guide for teaching because they help you see what the tidyverse is moving toward and what it’s moving away from. These are experimental, stable, deprecated, and superseded. But instead of focusing on the package that implements this concept, when teaching, I recommend focusing on the stages of the lifecycle instead. Lifecycle package is used to manage the lifecycle of functions and features within the tidyverse, with clear messaging about what is still experimental and what the tidyverse team is moving away from in the future. Each question is accompanied with a short answer as well as an expanded example. These were compiled based on popular questions on StackOverflow and RStudio Community. ggplot2 FAQ: A new resource that might be useful for learners is the FAQ we’ve recently developed for ggplot2, which you can access.Huge thanks to our internĪveri Perny on the fantastic work on this project! You can read more about the updates Cheatsheets: Some of the most popular learning resources for the tidyverse are the cheatsheets, many of which have recently been updated.SQL and data.table translations with dbplyr and dtplyr.Building on the tidyverse for modeling with tidymodels.Making reproducible examples with reprex.Much of what is discussed here has already been covered in package update posts on this blog, but my goal is to summarize the highlights that are most relevant to teaching data science with the tidyverse, particularly to new learners. The main audience for this post is educators who teach the tidyverse and who might want to bring their teaching materials up to date with updates to the tidyverse that happened over the past year. As we quickly approach the end of the summer (in the northern hemisphere) and the start of a new academic year, it seems like a good time to provide a new update for teaching the tidyverse, in 2021. Last summer I wrote a series of blog posts titled
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |