Dplyr
   HOME

TheInfoList



OR:

One of the core packages of the
tidyverse The tidyverse is a collection of open source packages for the R programming language introduced by Hadley Wickham and his team that "share an underlying design philosophy, grammar, and data structures" of tidy data. Characteristic features of t ...
in the
R programming language R is a programming language for statistical computing and graphics supported by the R Core Team and the R Foundation for Statistical Computing. Created by statisticians Ross Ihaka and Robert Gentleman, R is used among data miners, bioinforma ...
, dplyr is primarily a set of functions designed to enable dataframe manipulation in an intuitive, user-friendly way. Data analysts typically use dplyr in order to transform existing datasets into a format better suited for some particular type of analysis, or data visualization. For instance, someone seeking to analyze an enormous dataset may wish to only view a smaller subset of the data. Alternatively, a user may wish to rearrange the data in order to see the rows ranked by some numerical value, or even based on a combination of values from the original dataset. Authored primarily by
Hadley Wickham Hadley Alexander Wickham (born 14 October 1979) is a statistician from New Zealand and Chief Scientist at Posit, PBC (former RStudio Inc.) and an adjunct Professor of statistics at the University of Auckland, Stanford University, and Rice Un ...
, dplyr was launched in 2014. On the dplyr web page, the package is described as "a grammar of data manipulation, providing a consistent set of verbs that help you solve the most common data manipulation challenges."


The five core verbs

While dplyr actually includes several dozen functions that enable various forms of data manipulation, the package features five primary verbs: filter(), which is used to extract rows from a dataframe, based on conditions specified by a user; select(), which is used to subset a dataframe by its columns; arrange(), which is used to sort rows in a dataframe based on attributes held by particular columns; mutate(), which is used to create new variables, by altering and/or combining values from existing columns; and summarize(), also spelled summarise(), which is used to collapse values from a dataframe into a single summary.


Additional functions

In addition to its five main verbs, dplyr also includes several other functions that enable exploration and manipulation of dataframes. Included among these are: count(), which is used to sum the number of unique observations that contain some particular value or categorical attribute; rename(), which enables a user to alter the column names for variables, often to improve ease of use and intuitive understanding of a dataset; slice_max(), which returns a data subset that contains the rows with the highest number of values for some particular variable; slice_min(), which returns a data subset that contains the rows with the lowest number of values for some particular variable.


Built-in datasets

The dplyr package comes with five datasets. These are: band_instruments, band_instruments2, band_members, starwars, storms.        


Copyright & License

The copyright to dplyr is held by Posit PBC, formerly RStudio PBC. Dplyr was originally released under a
GPL The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general u ...
license, but in 2022 Posit changed the license terms for the package to the "more permissive"
MIT License The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license comp ...
. The chief difference between the two types of license is that the MIT license allows subsequent re-use of code within proprietary software, whereas a GPL license does not.


References

{{reflist Data analysis software Statistical software Free R (programming language) software