8 ms·
Tidyverse 2.0.0
- tecleandor 4y agoThere's a bit of circular logic in here. Can somebody make a short explanation on what's this is about? Overview The tidyverse is a set of packages that work in harmony because they share common data representations and API design. The tidyverse package is designed to make it easy to install and load core packages from the tidyverse in a single command.
- qsort 4y agoIt's a popular set of packages for data analysis in R. Similar to Python, it's an interpreted language with compiled libraries that do most of the heavy lifting.
- sowbug 4y agoThanks; that's helpful. "Data analysis in R" belongs somewhere in the quoted intro paragraph. Otherwise that paragraph could describe almost anything: game engine, graphics library, string processing, HTML rendering, embedded systems...
- tecleandor 4y agoNice, thank you!. I saw some R references in the feet, but couldn't tie it in
- jstx1 4y agoIt looks circular because of term overloading. There is "the tidyverse" which is a collection of packages like dplyr and tidyr for data manipulation and ggplot2 for visualization. Then there's "the tidyverse package" which allows you to import them all at once with "library(tidyverse)". You don't have to use the tidyverse package, you can load individual libraries as you need them.
- epgui 4y agoThis! Also worth noting that one of the common organizing principles between all packages in the tidyverse is the concept of "tidy data" (see specifically H Wickham's paper), and the use of intercompatible combinators.
- mattkrause 4y agoUnder the hood, the tidyverse is comprised of many packages, some very large and sprawling, like ggplot, and others that do one single thing (readr). Here’s a list: https://www.tidyverse.org/packages/ https://www.tidyverse.org/packages/ Individual packages can be used in isolation, if that’s what you need. However, they complement each other nicely, in that they share data representations and similar conventions while handling different facets of data analysis. Thus, people often import the whole thing in one shot as the tidyverse and go from there. For example, you might read the data in with readr, clean it up with tidyr or dplyr, analyze it with tidymodels, and plot the results with ggplot. The python equivalent would be a hypothetical meta-package that tightly integrates pandas, seaborn, and sklearn.
- kgwgk 4y agoIt's quite confusing. I don't think that lubridate has any relationship with anything else, for example, apart from being created by the same people.
- deleted 4y ago[deleted]
- VeninVidiaVicii 4y agoI have some concerns about the direction that certain packages within tidyverse, particularly dplyr, are heading. One issue I've noticed is the increasing frequency of warnings, such as when performing left or inner joins. These warnings can be a bit overwhelming at times. However, it's worth noting that you can suppress these warnings by using the "multiple='all'" parameter, which is easy to fumble when you’re exploring data, why not simply "all=TRUE”? It seems like a lack of ergonomics and considering user experience.
- nojito 4y agojoins are one of the biggest causes of data quality and integrity issues in the data space.
- VeninVidiaVicii 4y agoYeah maybe, but chaining a bunch of joins together when exploring some new data is a thing I do all the time. Then, 4-5 warnings push my results off the screen. It’s infuriating.
- naijaboiler 4y agoI avoid joins in R like a plague. Been burned. If I am working with a finite number of colummns, I just use base R match and add column by column. yes it breaks DRY but I don't get weird surprises. and I can re-run any section of the code at any time from any point without breaking things or joining the same and creating unintended duplicate columns
- LaserPineapple 4y agoWhat kind of weird surprises have you run into? Are they specific to R?
- victorbohr 4y agoTake a look at the powerjoin package. It let's you specify strict rules for your joins, for example requiring unique keys in the right-side table when doing a left join. It's got some other neat features as well.
- peatmoss 4y agoThe Tidyverse is a true gem in modern programming that deals with data. This release feels like a nice incremental improvement rather than a revolution. Adding lubridate as a core package will save me a few keystrokes. I also did not know about the conflicts package, but will certainly be using it in the future. I'm a bit surprised that other "better" programming languages haven't done more to replicate the Tidyverse. The Tidyverse is a masterclass in metaprogramming, and has a pretty big following. While R has some warts as a language, I'm not sure I've seen anything comparable to Tidyverse in terms of scope and influence. I see Julia trying with the Dataframes ecosystem, but it's got a ways to go before that feels cohesive like Tidyverse. If I could wave a magic wand, I'd get Hadley and the RStudio crew really excited about Julia or Racket. R does have warts, and I dream of the day when something better is as good.
- AuthorizedCust 4y ago> This release feels like a nice incremental improvement rather than a revolution. Look at the big picture, not simply the delta from the prior .x.y release. The Tidyverse feels like a product that evolves over time, rather than a traditional approach that jumps versions. Major changes sometimes come in seemingly minor releases. I feel that 2.0 simply means the evolution has gone on enough to put a retrospective marker in the sand. For something geared more to data science and exploration, rather than production use, I’m good with the evolutionary approach.
- leephillips 4y ago“Tidier.jl is a 100% Julia implementation of the R tidyverse mini-language in Julia.” https://github.com/TidierOrg/Tidier.jl https://github.com/TidierOrg/Tidier.jl
- ProjectArcturis 4y agoI wish someone would make a package with tidyverse syntax and data.table performance.
- mb5 4y agoCan’t say I’ve used it, but isn’t that what dtplyr is supposed to provide? https://dtplyr.tidyverse.org/ https://dtplyr.tidyverse.org/
- Breza 3y agoI like dtplyr. It shares the vast majority of code with dplyr and runs fast.
- Zeratoss 4y agohttps://markfairbanks.github.io/tidytable/ https://markfairbanks.github.io/tidytable/ maybe this?
- hooloovoo_zoo 4y agoI don't think it really matters. Tidyverse is fine for datasets of size 2 * (1...20?) . Data table buys you maybe 21..23? Then you're off to spark for 24+ anyway. So you'd only be covering a pretty narrow slice of the space.
- chaosfox 4y agoI have been using R almost daily for years now and its no hyperbole when I say that if ggplot2/dplyr wasn't a thing I would have never bothered with R.
- trts 4y agoAdding to that, it is what makes me miss R when using other languages. It just isn't very much fun to me to do discovery and building in python, but ultimately where things get operationalized.
- Breza 3y agoI completely agree with you. I think about what I want and R code comes out of my fingers. By comparison, pandas requires more thought to do intermediate-to-advanced things.
- fithisux 4y agoR needs to modernize. S7 is in the right direction if it displaces all previous failures. I love tidyverse though.
- troymc 4y agoI'm not familiar with S7, and Google wasn't much help. What is S7?
- t-kalinowski 4y agoIt's a new OOP system for R. repo: https://github.com/RConsortium/OOP-WG https://github.com/RConsortium/OOP-WG talk: https://www.youtube.com/watch?v=P3FxCvSueag&t=258s https://www.youtube.com/watch?v=P3FxCvSueag&t=258s
- kgwgk 4y agohttps://adv-r.hadley.nz/oo.html https://adv-r.hadley.nz/oo.html "There are multiple OOP systems to choose from. In this book, I’ll focus on the three that I believe are most important: S3, R6, and S4. S3 and S4 are provided by base R. R6 is provided by the R6 package, and is similar to the Reference Classes, or RC for short, from base R. "There is disagreement about the relative importance of the OOP systems. I think S3 is most important, followed by R6, then S4. Others believe that S4 is most important, followed by RC, and that S3 should be avoided. This means that different R communities use different systems." https://rconsortium.github.io/OOP-WG/ https://rconsortium.github.io/OOP-WG/ "The S7 package is a new OOP system designed to be a successor to S3 and S4." (https://xkcd.com/927/ https://xkcd.com/927/)
- disgruntledphd2 4y agoJust like Python has 4 different methods for string formatting, R has 4 different OOP systems... S7 does look nice though, from the README overview at least.
- deleted 4y ago[deleted]
- tpoacher 4y agoMy 2¢ on the tidyverse is that it is a bit misleading to call it "a collection of packages". I think it would be more accurate to call it a "framework". Though I suppose "opinionated collection of packages" is perhaps a fuzzy synonym for framework. The difference between "collection of packages" and "framework" is that "collection of packages" implies interoperable via API conventions, but otherwise standalone packages, which could easily be used in isolation alongside base R. Whereas "framework" generally means tightly coupled components, in a "do things my way or the highway" fashion. Technically speaking, it's not "impossible" to mix tidyverse with base R, but in general if you wanted to mix and match tidy vs base R syntax, you'd find yourself working "against" the tidy api rather than alongside it most of the time. R is not my main language, but every time I come across a task and I need to make a decision between R vs tidyR, the two feel like completely different languages. I also have some beef against some of the decisions/conventions used (e.g. abusing metaprogramming to pass variables and use the variable's label as a value, completely ignoring the variable's actual value, instead of passing it as a string or as an actual variable ... seriously confusing when you first come across it).
- kgwgk 4y ago> Whereas "framework" generally means tightly coupled components, in a "do things my way or the highway" fashion. Using that definition how would lubridate be part of the tidyverse "framework"? > Technically speaking, it's not "impossible" to mix tidyverse with base R, but in general if you wanted to mix and match tidy vs base R syntax, you'd find yourself working "against" the tidy api rather than alongside it most of the time. I don't know, wrapping readxl::read_excel with a as.data.frame or as.data.table call works beautifully for me.
- RosanaAnaDana 4y agoI think he's almost certainly speaking of the %>% group_by convention that is basically demanded of within the tidyworld. I load magrittr and ggplot and toss the rest out. Right to left reading order is all I really want from that world. Data tables are such a superior convention to tibbles that it's not even funny (I need a tibbles like I need another hole in the head).
- qudat 4y agoI’ve had to dip my toes into R recently to help my wife with data cleaning. `dplyr` is what I reach for when helping her. The pipe operator as well as treating csv tables as SQL was intuitive for me as a software engineer.
- Breza 3y agoHave you used sqldf? IMO it's one of the most underappreciated packages in the R ecosystem, especially for people who aren't fluent in R.
- kkoncevicius 4y ago> You’ll notice one other small change to the tidyverse message: we now advertise the conflicted package. Not a fan of the nature in which tidyverse promotes itself. They used to be more aggressive - i.e. advertising their books in package load messages [1]. But these new changes still feel like an ad. To me, as an outsider, tidyverse seems to mainly be about "dplyr". The main thing holding all of it together otherwise is just the fact that majority of their functions return a "tibble" instead of a data.frame, forcing you to load all the jungle of the rest of their stuff whenever you use one of their packages. [1]: https://win-vector.com/2019/08/30/it-is-time-for-cran-to-ban-package-ads/ https://win-vector.com/2019/08/30/it-is-time-for-cran-to-ban...
- j7ake 4y agoHas anybody switched from R (tidyverse and ggplot2) to python and found they can be equally or more productive in tabular data wrangling, data exploration and visualisations? Still using R because I find python cannot do exploratory data analysis of visualisation as well as R.
- disgruntledphd2 4y agoFor data manipulation, R/dplyr is still much, much superior. However, there's a ggplot clone called plotnine in Python which seems to be reasonably comprehensive.
- epgui 4y agoWhat R has going for it is ggplot2, which is heavily inspired by a formally validated "Grammar of Graphics" (see the L Wilkinson book). One of the main reasons why the tidyverse works so well is because it tends to follow the organizing principle of "tidy data" (see the H Wickham paper) with some combinator interoperability between packages. R itself is pretty insane ("bad") in terms of language design, even though it has some neat tricks and features. Python is a much saner language than R (I am not talking of packages here), but it's still super clunky by design (less so than R). It can most certainly do all the things that R does, although its plotting libraries are either lacking in their design (matplotlib) or maturity (the other GoG-inspired libraries). When you continue on your journey to learn more languages, at some point you realize that when you have a well-designed, simple and consistent language, you really don't need very many packages to get the job done fast. I had this a-ha moment with Clojure (although I find working with the JVM annoying).
- otabdeveloper4 4y ago> Python is a much saner language than R That's like saying that cat turds smell much better than dog turds. Maybe it's technically true, but let's not split hairs here.
- epgui 4y agoHaha I wouldn’t say it like that, but I’m pretty sure we feel the same way deep down. Regardless of how true your comment might be, this can seem a bit hostile or condescending to people who don’t have a “cleaner” reference point for language design. Or, in the “fog of war” of competing alternatives, it may even appear unreasonable to experienced programmers: we’re so used to thinking that everything is a tradeoff that over time we can forget that some things really can be “just better” than other things. Most of the time when we hear such claims, it comes from a place of subjective preference or over-generalization, so our brains pattern match strongly against that. And at the end of the day, as a practical matter, the best camera is the one you carry with you, and the best tool is the one you can use.
- civilized 4y agoI am an unapologetic Hadley fanboy. He is a genius. Never in my working life has anyone made so many good decisions that directly benefitted me. My R productivity is so incredibly much higher than it would have been without him. The worst thing I can say about tidyverse is that I find the stack traces increasingly gnarly. The information you need to debug is there, there's just a lot of filler. I have some faith that they know and they're working on it.
- Breza 3y agoSame here! Hadley is incredible. He can think, code, and write amazingly well. Lots of people can do two of the three. It's rare to find someone who does all three.