dplyr

R 패키지 메타데이터와 수집 신호를 모아 봅니다.

Packages / CRAN / dplyr

dplyr

v1.2.1
Repository CRANLicense MIT + file LICENSELifecycle activeNeeds compilation yes
DOI
10.32614/CRAN.package.dplyr
Task views
Databases with R, Model Deployment with R
Reverse imports
182,053
Reverse depends
5,192

Core Signals

첫 화면에서 판단해야 할 수집 신호를 먼저 배치합니다.

3
Task views
Databases with R, Model Deployment with R
Reverse imports
182,053
Reverse depends
5,192

Supported Backends

DESCRIPTION에서 감지한 backend 관련 package입니다.

3
D
DBI
Suggests
D
dbplyr
Suggests
R
RSQLite
Suggests

Quick Facts

기본 메타데이터를 작은 카드와 토큰으로 압축합니다.

profile
Repository
CRAN
Version
1.2.1
License
MIT + file LICENSE
Lifecycle
active
Needs compilation
yes
Reverse depends
5,192
Reverse imports
182,053
Last observed
2026-05-30
CRAN
cran.r-project.org/package=dplyr

수집 소스별 패키지 정보

2개 소스
CRAN
1.2.1
2026-05-30
License
MIT + file LICENSE
Depends
R (>= 4.1.0)
Imports
cli (>= 3.6.2), generics, glue (>= 1.3.2), lifecycle (>= 1.0.5), magrittr (>= 1.5), methods, pillar (>= 1.9.0), R6, rlang (>= 1.1.7), tibble (>= 3.2.0), tidyselect (>= 1.2.0), utils, vctrs (>= 0.7.1)
Suggests
broom, covr, DBI, dbplyr (>= 2.2.1), ggplot2, knitr, Lahman, lobstr, nycflights13, purrr, rmarkdown, RSQLite, stringi (>= 1.7.6), testthat (>= 3.1.5), tidyr (>= 1.3.0), withr
Needs compilation
yes
Reverse depends
5,192
Reverse imports
182,053
Lifecycle
active
Last observed
2026-05-30 10:45:11
R-universe
1.2.1.9000
2026-05-30
Depends
R
Imports
cli, generics, glue, lifecycle, magrittr, methods, pillar, R6, rlang, tibble, tidyselect, utils, vctrs
Suggests
broom, covr, DBI, dbplyr, ggplot2, knitr, Lahman, lobstr, nycflights13, purrr, rmarkdown, RSQLite, stringi, testthat, tidyr, withr
Last observed
2026-05-30 11:26:48

이 패키지가 의존하는 패키지

5개 표시전체 29개
PackageTypeSpec
cli
CRAN · 1.2.1 · 2026-05-30
Importscli (>= 3.6.2)
generics
CRAN · 1.2.1 · 2026-05-30
Importsgenerics
glue
CRAN · 1.2.1 · 2026-05-30
Importsglue (>= 1.3.2)
lifecycle
CRAN · 1.2.1 · 2026-05-30
Importslifecycle (>= 1.0.5)
magrittr
CRAN · 1.2.1 · 2026-05-30
Importsmagrittr (>= 1.5)
1 / 6

이 패키지를 쓰는 패키지

5개 표시전체 120개
PackageTypeSpec
actLifer
1.0.0
CRAN · 2026-05-30
Dependsdplyr (>= 1.0.10)
adjustr
0.2.0
CRAN · 2026-05-30
Dependsdplyr (>= 1.0.0)
Andromeda
1.2.0
CRAN · 2026-05-30
Dependsdplyr
AQuadtree
1.0.6
CRAN · 2026-05-30
Dependsdplyr
arse
1.0.0
CRAN · 2026-05-06
Dependsdplyr
1 / 24

Reverse dependency summary

4 types
TypePackages
Depends137
Imports4,657
Suggests1,114
Enhances1

패키지 페이지

Reverse depends
318
Reverse imports
10,406
Reverse suggests
2,414
Reverse enhances
2
All links
6,643
Repository
CRAN
Version
1.2.1
Collected
2026-05-23 11:11:45
Package page
https://cran.r-project.org/web/packages/dplyr/index.html
DOI
10.32614/CRAN.package.dplyr
CRAN checks
https://cran.r-project.org/web/checks/check_results_dplyr.html
README
https://cran.r-project.org/web/packages/dplyr/readme/README.html
NEWS
https://cran.r-project.org/web/packages/dplyr/news/news.html
Reference HTML
https://cran.r-project.org/web/packages/dplyr/refman/dplyr.html
Reference PDF
https://cran.r-project.org/web/packages/dplyr/dplyr.pdf
Source package
https://cran.r-project.org/src/contrib/dplyr_1.2.1.tar.gz
Archive
https://CRAN.R-project.org/src/contrib/Archive/dplyr
In views
DatabasesModelDeployment
Page fields
Author
Hadley Wickham [aut, cre], Romain François [aut], Lionel Henry [aut], Kirill Müller [aut], Davis Vaughan [aut], Posit Software, PBC [cph, fnd]
BugReports
https://github.com/tidyverse/dplyr/issues
CRAN Checks
dplyr results
DOI
10.32614/CRAN.package.dplyr
In Views
Databases , ModelDeployment
License
MIT + file LICENSE
Maintainer
Hadley Wickham <hadley at posit.co>
Materials
README , NEWS
NeedsCompilation
yes
Old Sources
dplyr archive
Package Source
dplyr_1.2.1.tar.gz
Published
2026-04-03
Reference Manual
dplyr.html , dplyr.pdf
Reverse Depends
actLifer , AlphaMissenseR , AMARETTO , Andromeda , AnVIL , AQuadtree , autoCovariateSelection , autoGO , babyTimeR , BatchGetSymbols , bbnet , BiocSet , broadSeq , btb , BTYD , bulletcp , bunching , cchsflow , cellxgenedp , ceRNAnetsim , cft , chunked , ClassificationEnsembles , compindexR , ConconiAnaerobicThresholdTest , CONCUR , contTimeCausal , countmaskr , cspp , cvcqv , dartR , dartR.base , depmap , DEqMS , DFplyr , diffEnrich , duckplyr , dvmisc , echoice2 , egor , EHRtemporalVariability , EpiCurve , EpiStats , estimraw , etl , evalHTE , evalITR , eyetrackingR , flatr , ForecastingEnsembles , FormulR , funMoDisco , gen5helper , geotoolsR , GerminaR , geslaR , ggmcmc , ggraptR , ggsurvey , goat , goatea , grasp2db , Greymodels , Guitar , HEDA , HiCcompare , huito , IBRtools , immundata , implyr , integr , inti , IPDfromKM , itraxR , LogisticEnsembles , longitudinalANAL , MacBehaviour , malan , manydata , matchMulti , metevalue , mevr , micropan , microseq , micss , miLAG , mixopt , monobin , normfluodbf , NTLKwIEx , NumericEnsembles , octad , omada , onmaRg , optimalFlow , OSFD , PAMpal , pfamAnalyzeR , phenModel , photosynthesisLRC , pii , plyranges , PogromcyDanych , PolicyPortfolios , prodest , promotionImpact , protGear , psychometric , PupillometryR , PupilPre , QuantPsyc , QuaternaryProd , quickpsy , QurvE , radiant.data , RAIDS , rangecondprob , RCPA , recipes , recurrentpseudo , ReDaMoR , RegEnrich , repello , RFLOMICS , rise , RiskScorescvd , rmdHelpers , rollup , rQSAR , Rtpca , saccadr , samplesize4surveys , SCdeconR , SEERaBomb , sfc , shinyML , SimDissolution , simITS , spect , StatMatch , sugarbag , survHE , tab , tangram.pipe , TeachHist , TeachingSampling , textanalyzer , thestats , tidypopgen , TKCat , TLCAR , toolmaRk , TPP , TPP2D , VectorCodeR , vectorsurvR , visae , VWPre , wINEQ
Reverse Enhances
quanteda
Reverse Imports
AATtools , ABCDscores , abjutils , AbSolution , academictwitteR , accelEE , AccelStab , accept , accrualPlot , accucor , ACDm , Achilles , acledR , acroname , ActCR , ActFrag , ActiSleep , activAnalyzer , activatr , activPAL , actogrammr , actuary , actuaryr , actxps , adabag , ADAM , ADAMgui , adaptalint , adas.utils , adcontabil , addinsJoaoMelo , addinsOutline , additive , adductomicsR , adegenet , adepro , adept , adheRenceRX , adjustedcranlogs , adjustedCurves , admiral , admiraldev , admiralmetabolic , admiralneuro , admiralonco , admiralophtha , admiralpeds , admiralvaccine , admixr , adobeanalyticsr , adventr , aeddo , aedseo , AEenrich , aelab , Aerith , AeRobiology , AeroSampleR , afcharts , afcolours , afdx , afmToolkit , aftables , agcounts , AgeBandDecomposition , AgePopDenom , AgeTopicModels , aggreCAT , agregR , agricolaeplotr , AgriDiversiX , agriutilities , agrobox , AgroReg , agrostab , ags , agua , agvgd , AHPGaussian , AHPWR , AIBias , aihuman , aire.zmvm , AirExposure , airGRiwrm , AirMonitor , airpart , airportr , airship , airt , AIscreenR , akc , akiFlagger , alakazam , alarmdata , aLBI , ale , alevinQC , alfred , AlgeriAPIs , alien , AlignLV , allestimates , allMT , allofus , ALLSPICER , alookr , AlphaBeta , alphabetr , AlphaPart , alphavantagepf , alphavantager , AlpsNMR , altfuelr , amadeus , amapGeocode , AMAPVox , ambiR , AmesHousing , aMNLFA , amp , amp.dm , amt , anabel , Analitica , analyzer , AnanseSeurat , aNCA , andorR , anglemania , AnglerCreelSurveySimulation , animalcules , AnimalSequences , animbook , anipaths , aniSNA , annotater , AnnotationHub , annotatr , anomalize , anomaly , ANOVAIREVA , ANOVAShiny , ANOVAShiny2 , AntClassify , AnthropMMD , AntibodyForests , AntsNet , AnVILBase , AnVILBilling , AnVILGCP , AnVILWorkflow , anyflights , aoristic , AOUSDOHtools , AovBay , apa , apa7 , APackOfTheClones , APAlyzer , apaTables , apaText , APCalign , APCI , APCinteraction , APCtools , APIS , aplotExtra , apmx , applicable , appRiori , APRScenario , apyramid , AQEval , AquaBEHER , aquacultuR , AquaticLifeHistory , aquodom , arcgeocoder , archipelago , archiveRetriever , arcpullr , ARDECO , ARDL , ardl.nardl , areal , arete , ArgentinAPI , AriGaMyANNSVR , artMS , ARTool , artpack , arulesViz , ARUtools , ashapesampler , askgpt , ASML , aspline , asremlPlus , assertHE , assertr , ASSISTant , AssumpSure , ATACseqTFEA , Athlytics , ATQ , AudioScatter , audubon , auk , AustralianPoliticians , autocogs , autoFC , autoFlagR , autogam , autograph , autoharp , autohrf , autoimport , automagic , autoMR , autonomics , AutoPlots , autoReg , AutoScore , autoslider.core , autostats , autotesteR , autotestR , autoTS , AutoWMM , AuxSurvey , AVGAS , avidaR , avotrex , avstrat , AWAggregator , aws.wrfsmn , AzureKusto , babelgene , babelwhale , bacenR , backtestGraphics , baclava , bacontrees , badp , baf , bagged.outliertrees , baguette , baizer , bakR , baldur , bambooHR , bambu , bamm , bandle , banffIT , banR , banter , barbieQ , barrks , bartMan , bartXViz , baseballr , basecallQC , basecamb , basedosdados , baserater , BaseSet , basictabler , basket , BasketballAnalyzeR , BatchQC , BatchSVG , batchtma , bate , Battlefield , BAwiR , bayes4psy , bayesammi , BayesChange , bayesdfa , bayesEO , BayesERtools , bayesestdft , BayesFBHborrow , BayesGrowth , bayesian , BayesianDisaggregation , BayesianFitForecast , BayesianLaterality , BayesianMCPMod , BayesianReasoning , bayesics , bayesmlogit , BayesMoFo , BayesMortalityPlus , bayesmove , BayesMultiMode , bayesnec , BayesPET , bayesplot , BayesPostEst , BayesPPDSurv , bayesrules , BayesSenMC , BayesSIM , BayesSpace , bayesSSM , BayesVolcano , baystability , baytrends , bcdata , BCEA , BCFM , Bchron , bdc , bddkR , bdf3 , bdl , bdsm , beadplexr , beastt , beaver , BED , bedbaser , bedrockbio , BeeBDC , beeca , BeeGUTS , beezdemand , beezdiscounting , befproj , bellreg , benchmarkme , benchmarkmeData , bennu , benthos , bertopicr , besthr , bestNormalize , bestSDP , betaHMM , BetterReg , bettr , bfbin2arm , bfboinet , BFS , bfw , BgeeCall , BgeeDB , BGPhazard , bib2df , bibliometrix , biblioverlap , bidser , bidux , BigDataPE , bigergm , bigMICE , BIGr , bigtime , BinaryReplicates , BindingSiteFinder , BINtools , biobroom , bioCancer , BiocAzul , BiocBook , BiocBuildReporter , BiocFHIR , BiocFileCache , BiocHail , BiocPkgDash , BiocPkgTools , biodosetools , biogrowth , BioGSP , Bioi , bioinactivation , biomartr , biomod2 , BioMonTools , BioMoR , BioNAR , bioRad , bioseq , bioSNR , biostats101 , BiostatsUHNplus , BioTIMEr , biotmle , BioTrajectory , BioVizSeq , bipartiteD3 , bipd , birddog , birdie , birdscanR , BIS , bistablehistory , bitfield , bitmexr , bivarhr , BiVariAn , bivariateLeaflet , BivRec , bkmr , blackmarbler , blaise , blase , blastula , blendR , blindspiker , BlockCov , blockr.dplyr , blockstrap , blockTools , blocs , BloodCancerMultiOmics2017 , BLRShiny , BLRShiny2 , BLSloadR , blsR , bluebike , BlueCarbon , BMisc , bml , bndovb , bnmonitor , bnRep , BOBaFIT , bodsr , boiwsa , BOJ , BOLDconnectR , bolsec , bonsai , bonsaiforest , boostingDEA , bootcluster , bootCT , bootnet , borealis , BoundaryStats , boxr , boxTest , bp , BPrinStratTTE , brandr , BrazilCrime , BrazilDataAPI , BrazilMet , BRCore , BREADR , BreastSubtypeR , breathtestcore , breathteststan , bregr , brendaDb , brfinance , brickset , brickster , bridgr , brightspaceR , BRINDA , briqr , brisk , brms.mmrm , brokenstick , brolgar , broom , broom.helpers , broom.mixed , BRRAT , bruceR , brulee , bruneimap , bsam , BSET , bSi , bsitar , bskyr , bsocialv2 , bspcov , bssm , BSTZINB , bsynth , btw , bugphyzz , bulkreadr , bullseye , bumbl , bumblebee , bunddev , bupaR , bursa , BUSpaRse , butterfly , butterflyOptions , bvhar , c2z , c3 , cacc , caffsim , CalcThemAll.PRM , calendR , calendRio , calibmsm , CalibraCurve , calibrationband , CalibrationCurves , calidad , callsync , calms , calpassapi , CaMeA , CamelUp , campfin , campsis , campsismod , camtrapdp , camtrapR , CaMutQC , canadamaps , canadianmaps , canaper , cancensus , canceR , CancerGram , cancerradarr , candisc , CANE , cansim , CAOP.RAA.2024 , capesR , capl , CARBayes , CARBayesST , carbonpredict , carbonr , card , CardiacDP , cardinalR , cards , CARDspa , cardx , care4cmodel , caretForecast , caretSDM , CARM , carnation , CARNIVAL , carpenter , cartograflow , cases , casimir , cassandRa , cassowaryr , castgen , CATAcode , catalog , CATALYST , CatastRo , catcont , catlearn , catmaply , catool , cats , catviz , causact , causal.decomp , causalBatch , causalDisco , causalDT , causalPAF , CausalQueries , CausCor , CB2 , CBASSED50 , cBioPortalData , cbioportalR , CBNplot , cbpManager , cbsREPS , CCAFE , CCAMLRGIS , cccm , cccrm , CCI , ccLRforR , CCMnet , ccmReportR , ccoptimalmatch , ccostr , CCPlotR , ccpsyc , CCWeights , cder , cdlsim , CDMConnector , cdrcR , CDSim , ceblR , CEDA , CEDMr , celaref , CellBench , cellGeometry , CellMixS , cellscape , CEMiTool , censable , censcyt , censo2022arg , censobr , censored , censuspyrID , centr , CEOdata , CepalStatR , Cepo , cepR , cepumd , ceramic , ceRtainty , Certara.DarwinReporter , Certara.ModelResults , Certara.R , Certara.RsNLME.ModelExecutor , Certara.VPCResults , Certara.Xpose.NLME , ces , ceser , CeTF , cfbfastR , cfda , cfdnakit , cfDNAPro , CFO , cforecast , cforward , cgam , cgmquantify , ChangePointTaylor , Characterization , charisma , charlesschwabapi , chcd , checkhelper , checkLuhn , cheese , chessboard , chest , ChestVolume , chevreulPlot , chevreulProcess , chevreulShiny , chevron , childesr , childeswordfreq , childsds , ChileDataAPI , chilemapas , chillR , chimeraviz , ChinAPIs , chiOpenData , ChIPexoQual , ChIPpeakAnno , ChIPseeker , CHNCapitalStock , choicedata , chopin , choroplethr , chromer , ChromSCape , chronicle , chronicler , chronochrt , ci , cia , cicalc , cicero , ciecl , CIMICE , cimir , CimpleG , CIMTx , cinaR , CINE , circRNAprofiler , CircSeqAlignTk , CIS.DGLM , cisp , citationchaser , cities , ciTools , citrus , citsr , cjar , ckanr , clap , ClassifyR , cleanepi , Cleanet , CleaningValidation , clevRvis , clidatajp , climaemet , climatehealth , climodr , clinCompare , clinDR , clinicalfair , clinicalomicsdbR , clinicalsignificance , clinify , clinpubr , clintools , clintrialx , cliProfiler , clockify , clockplot , clootl , cloudfs , clptheory , clr , CLRtools , CLSIEP15 , CluMP , clusEvol , ClustAll , clustAnalytics , ClustAssess , ClusterFoldSimilarity , clusterGGM , ClusterGVis , Clustering , clustermole , clusterProfiler , clusterWebApp , clustifyr , ClustImpute , ClustIRR , ClustMC , clustMixType , clustrd , clustree , clustringr , CLUSTShiny , CMapViz , cmhc , CMHSU , CMMs , cmpp , cmpsR , cms , cmstatr , cmstatrExt , CMTFtoolbox , CNAIM , cnaOpt , cnefetools , CNViz , CNVreg , CNVScope , coalitions , cocktailApp , cocoon , codebook , codebookr , CodelistGenerator , codestral , codified , codyna , coefplot , cofad , coFAST , CoGAPS , cogena , coglyphr , cogmapr , cognitoR , cohortBuilder , CohortCharacteristics , CohortConstructor , CohortContrast , CohortGenerator , CohortMethod , CohortPlat , cohorts , CohortSurvival , CohortSymmetry , colleyRstats , collidr , ColombiAPI , ColOpenData , colorfindr , colorizer , ColorNameR , colorrepel , Colossus , colouR , comapr , ComBatFamQC , combcoint , combiroc , COMBO , COMIX , COMMA , commecometrics , CommonDataModel , comorosmaps , compareDF , compareMCMCs , COMPASS , CompensAID , comperank , comperes , compIndexBuilder , completejourney , CompositeReliability , compositeReliabilityInNestedDesigns , CompoundDb , ComPrAn , concatipede , concordance , condformat , condiments , condorOptions , ConfidenceEllipse , ConFluxPro , ConfusionTableR , congress , CongressData , CoNI , Conigrave , conmet , connections , connector , connector.databricks , connectwidgets , conos , conquestr , ConSciR , ConsensusClustering , consortr , containr , contentanalysis , conText , contoso , contourforest , contribution , contsurvplot , convdistr , convergenceDFM , convergEU , ConversationAlign , CoordinateCleaner , CopernicusClimate , CopernicusDataspace , CopernicusMarine , cophescan , copulaSim , Coralysis , coRdon , corella , coreSim , corncob , corporaexplorer , correlationfunnel , correlationr , corrMCT , corrmeta , corrr , corto , CortSineScore , CoSIA , cosmic , cosmosR , COTAN , Counternull , Countr , countries , countsimQC , countyhealthR , couplr , covalchemy , coveR2 , covid19.analytics , covid19br , covid19france , covid19sf , covid19tunisia , covid19us , covidcast , COVIDIBGE , CovidMutations , cpam , cpsvote , CR2 , CRABS , cramR , crandep , crane , CRANsearcher , crawl , CrcBiomeScreen , cre.dcf , cricketdata , cricketr , crimedata , crimeutils , CRISPRseek , criticality , criticalpath , critpath , crm12Comb , CRMetrics , crmPack , cromwellDashboard , CropBreeding , cropDemand , cropgrowdays , CropScapeR , CrossCarry , CrossClustering , CrossExpression , crosshap , crossmap , crossnma , crosstable , crossurr , crqa , crsuggest , crt2power , CRTspat , crumblr , crupR , crypto2 , crystract , CSCNet , csdb , CSHShydRology , csmGmm , CSOA , csodata , csquares , CSTools , csurvey , CTexploreR , cthist , ctlr , ctoclient , cTRAP , ctrdata , ctrialsgov , CTShiny , CTShiny2 , cubble , cubelyr , cucumber , CUFF , cuperdec , CuratedAtlasQueryR , curatedMetagenomicData , cureplots , CurricularAnalytics , currr , cutpointr , cvap , cvasi , cvCovEst , cvdprevent , CVglasso , cvms , cyclestreets , Cyclops , cylcop , cypress , CytoDx , CyTOFpower , CytoGLMM , cytoKernel , cytominer , CytoML , CytoProfile , czechrates , czso , d3po , d3r , d3Tree , dabestr , dadjokeapi , dados , DAGassist , dail , daltoolbox , DamageDetective , damAOI , damidBind , dampack , Damsel , daqapo , dar , dartR.popgen , dartR.sim , data.validator , datacleanr , dataCompare , datacult , datacutr , datadictionary , datadiff , datadogr , dataframeexplorer , datamedios , DataMetProcess , datamuseum , dataprep , DataQualityDashboard , dataquieR , datardis , dataSDA , dataspice , DatastreamDSWS2R , DataSum , datasusr , dataviewR , datazoom.amazonia , datazoom.social , datetoiso , datos , datrProfile , days2lessons , daySupply , dbGaPCheckup , dbglm , dbMatrix , dbparser , dbplot , dbplyr , dbProject , dceasimR , dci , DCLEAR , dcm2 , dcmstan , DCPO , dCUR , dcurves , DDESONN , ddpcr , deaR , dearseq , debiasedTrialEmulation , debkeepr , DeBoinR , decemedip , decisionpaths , decisionSupport , DecomposeR , decompositionLE , DeconvoBuddies , deconvR , decoupleR , DedooseR , DeductiveR , deepMOU , deepspat , deepSTRAPP , DeepTarget , DEET , deflateBR , degradr , DEGreport , deident , delaydiscount , deliberr , delimtools , delma , DELocal , demodelr , DemoKin , demor , demulticoder , demuxSNP , dendRoAnalyst , dendroNetwork , dendroTools , denguedatahub , denovolyzeR , densityarea , dentomedical , DepecheR , DEplotting , depower , deprivateR , DESA , DeSciDe , describedata , DescribeDF , DescriptiveStats.OBeu , descriptr , descstat , descsuppR , descsuppRplots , desctable , descutils , designit , designr , desirability2 , DESNP , DESpace , detectXOR , detrendr , dexisensitivity , dexter , dextergui , df2yaml , dfeR , dfoliatR , DGEobj.utils , dgpsi , dhmeasures , DHS.rates , DHSr , diagFDR , DiagrammeR , dials , dibble , diceplot , diceR , Dict , DIDHAD , DIDmultiplegt , DIDmultiplegtDYN , didrooRFM , diegr , DIETCOST , DiffBind , diffcyt , diffdfs , diffUTR , difR , digiRhythm , dilp , DImodelsMulti , DImodelsVis , dinoR , directAgeStd , disaggregation , DisasterAlert , disbayes , discAUC , disclosuR , discordant , DiscoRhythm , discourseGT , discoverableresearch , DiscreteDLM , DiscreteGapStatistic , diseasystore , DisimForMixed , DisImpact , dispositionEffect , dissever , Distance , DistatisR , distcomp , DistPlotter , Distributacalcul , distrr , Ditwah , ditwahLandslide , divent , DiversityStats , DIVINE , divraster , divseg , dkanr , DLMtool , dlmtree , dlookr , dm , dmai , DMCfun , dMod , dmtools , dmutate , DNABarcodeCompatibility , dndR , DNEA , doBy , docorator , docxtractr , dogesr , DOIcreator , dominatR , dominoSignal , donutsk , door , DOPE , dorothea , doseSens , DOtools , dots , dotsViolin , dotwhisker , doudpackage , dowser , dpasurv , dpm , DPpack , dqcheckr , drawProteins , drawsample , drcSeedGerm , drcte , dreamer , dreamlet , drhutools , drifter , drimmR , drpop , drugDemand , DrugExposureDiagnostics , drugfindR , drugsens , drugTargetInteractions , DrugUtilisation , DSAIDE , DSAIRM , dsBase , dsBaseClient , dscore , dsims , DSMolgenisArmadillo , dsmSearch , DspikeIn , DSpoty , dsROCrate , DSSAT , dst , dsTidyverse , DSWE , Dtableone , DTAT , DTEAssurance , dtGAP , dtplyr , dtrackr , DTSEA , dtwclust , duawranglr , duckdbfs , duckh3 , duckspatial , duet , dumbbell , Dune , dunlin , DuoClustering2018 , DuplexDiscovereR , dupree , dverse , dwctaxon , DWLS , dycdtools , dynamicpv , dynamicSDM , dynConfiR , dyngen , DynNom , dynparam , dynRB , dynutils , dynwrap , dySEM , E2E , e2tree , eam , eAnalytics , easier , easy.utils , easyalluvial , easybgm , EasyCellType , easycensus , easyEWAS , easynem , easyr , easyRaschBayes , easyScieloPack , easysurv , easytable , eat , eatRep , EBASE , ebirdst , ebnm , ec50estimator , ecan , ECDFniche , echarts4r , echarty , echor , echos , eclipseplot , ecocbo , EcoCleanR , ecocomDP , EcoEnsemble , EconCausal , econet , econid , econtools , ecoTolerance , ECOTOXr , ecr , ectotemp , Ecume , eda4treeR , edar , EDCimport , edeaR , edfinr , edgarfundamentals , edibble , ediblecity , editbl , editData , eDNAfuns , eDNAjoint , educabR , EEAaq , eemR , ef , EFAtools , EFDR , effectcheck , EFSATools , eHDPrep , EHRmuse , EIAapi , EIEntropy , eiExpand , eks , elaborator , electionsBR , electoral , Elja , ELMER , EloOptimized , ELViS , emayili , embed , emburden , emcAdr , emery , EmiR , EML , emln , emodnet.wfs , EMOTIONS , emuR , encryptr , ENMeval , EnrichDO , EnrichIntersect , enrichplot , ensembleTax , ensModelVis , EntropicStatistics , entrymodels , eoffice , epe4md , eph , Epi , epicmodel , epiCo , epicontacts , epicR , epidata , epidecodeR , epidict , epifitter , EpiForsk , epikit , EpiMix , EpiModel , EpiNova , EpiReport , epiSeeker , EpiSignalDetection , EpiSimR , episomer , EpiStandard , epitabulate , EpiTest , epitrix , epiviz , epizootic , epmfd , epo , epocakir , eppoFindeR , epts , epubr , EquiTrends , ERDbuilder , ergm.ego , ergm.sign , ergMargins , ern , ernm , ERSA , esaps , escalation , eSDM , esem , esmtools , estadistica , estatapi , EstHTSeed , EstimateBreed , EstimateGroupNetwork , esvis , esviz , ethnobotanyR , etrader , eudract , eufmdis.adapt , euroleaguer , europepmc , eurostat , EvaluateCore , EValue , evaluomeR , EventPredInCure , eventreport , eventstream , eventstudyr , EvidenceSynthesis , evinf , EvoPhylo , evprof , evsim , EWCE , examly , excel2eprime , exceldata , excessmort , excluder , ExPanDaR , ExpBites , expDB , experiences , ExpertChoice , expertsurv , explainer , explor , explore , ExploreModelMatrix , expowo , expstudy , extraChIPs , extractFAERS , extrasteps , ExtremeCI , exuber , eye , eyedata , eyelinkReader , eyeris , EZbakR , ezcox , ezec , ezplot , ezTrack , f1dataR , f1pits , fable , fable.ata , fable.prophet , fableCount , fabletools , fabR , fabricQueryR , facerec , factormodel , factR , faersquarterlydata , FAfA , fairGATE , fairGNN , FAIRmaterials , FakeDataR , fakir , famat , farr , farrell , FARS , fasster , fasstr , FAST.R , fastFMM , FastJM , fastLink , fastml , fastplyr , fastqcr , fastR2 , fastreg , fastrep , fastRG , fastRhockey , fastTopics , fastTS , FastUtils , faux , FAVA , FAVAR , fcall , fcaR , fcfdr , fChange , FCO , fdapaceShiny , fdid , feasts , FeatureExtraction , FeatureTerminatoR , fec16 , fect , FedData , fedup , feisr , felp , feltr , fenr , ferrn , ffiec , ffp , ffscrapr , fftab , FFTrees , fgdiR , fgeo , fgeo.analyze , fgeo.plot , fgeo.tool , fibos , fido , FielDHub , figma , file2meco , filebin , filibustr , filtro , finalfit , FinanceGraphs , FIND , findGSEP , FindIT2 , findSVI , finetune , fingerPro , finna , finnsurveytext , finnts , finto , fireexposuR , firmmatchr , FishDiveR , fishmechr , fishRman , fishualize , fitbitr , fitlandr , fitPS , fitteR , fitzRoy , fixes , fkbma , FKmL , FLAMES , flametree , flashier , flashlight , flassomsm , flattabler , flevr , flexCausal , flexCountReg , flexFitR , flexlsx , flexsurv , flexurba , flipbookr , flora , FLORAL , flourishcharts , flowchart , flowcluster , flowGate , flowmapper , FlowSOM , flowTime , flowTraceR , flowWorkspace , fluxfixer , fluxible , FluxSeparator , fluxtools , FMAT , fmesher , fmi , fmpapi , fmpcloudr , fobitools , fonctionr , foodwebWrapper , footBayes , footprint , foqat , forceR , FoRDM , forensicolors , foreSIGHT , forestat , forestControl , forestecology , ForestElementsR , forestmangr , forestmodel , forestr , forestsearch , forgts , ForIT , formods , forstringr , fortniteR , fourSynergy , fPASS , FPLdata , fpp3 , fqacalc , fqar , fr , FracFixR , fractalforest , fRagmentomics , frailtypack , framecleaner , frenchdata , freqtables , frictionless , FRK , frscore , fruclimadapt , FSinR , FSK2R , fsr , fst4pg , ftDK , ftExtra , fude , funcharts , functiondepends , funkyheatmap , funModeling , funneljoin , FunnelPlotR , funOmics , funspotr , funStatTest , furniture , furrowSeg , FuzzyClass , fuzzyjoin , fuzzylink , FuzzyPovertyR , G2Sd , G4SNVHunter , GA4GHclient , GA4GHshiny , gaawr2 , GABB , gageRR , galah , galaxias , galigor , GALLO , gammaFuncModel , ganttify , gap , GapAnalysis , gasmodel , gastempt , gatoRs , gbfs , gbifdb , gbm.auto , GBOP2 , gclink , gcplyr , GCPtools , GCubeR , gcxgclab , gde , gdim , GDPuc , gdverse , GeDi , geeLite , GEInfo , gemini , genBaRcode , GencoDymo2 , gender , geneHummus , genekitr , geneplast.data , geneset , genesysr , genetic.algo.optimizeR , geneticae , GeNetIt , GeneTonic , geneviewer , geneXtendeR , GENIE3 , genieBPC , genio , geniusr , GenomAutomorphism , GenomicDataCommons , GenomicDistributions , GenomicInteractions , GenomicPlot , GenomicSuperSignature , GenoTriplo , GenTwoArmsTrialSize , geoAr , geobounds , geobr , geocacheR , geocausal , geocmeans , geocodebr , geocomplexity , geoDeltaAudit , geodimension , geodiv , geofi , geoflow , geogenr , geomander , GeomArchetypal , geomultistar , GeomxTools , geoprofiler , GEOquery , geosimilarity , geospark , geospatialsuite , GeoTox , GeoWeightedModel , gerda , germinationmetrics , GeRnika , gesisdata , GetBCBData , GetDFPData2 , GetFREData , getLattes , GetLattesData , GetQuandlData , getRad , getspres , GetTDData , geyser , GFE , gfoRmulaICE , gg4way , ggalignment , ggalluvial , GGally , ggarchery , ggauto , ggautomap , ggbrain , ggbrick , ggBubbles , ggchangepoint , ggcharts , ggcleveland , ggcorrheatmap , ggdag , ggdiagram , ggdibbler , ggdiceplot , ggDNAvis , ggfacto , ggfields , ggFishPlots , ggflowchart , ggfocus , ggfootball , ggfortify , ggfun , gggda , gggenomes , gghdx , gghighlight , ggHoriPlot , gghourglass , ggincerta , ggInterval , ggip , ggiraph , ggiraphExtra , ggisotonic , ggkegg , gglycan , gglyph , ggmanh , ggmap , ggmapcn , ggmice , ggmRSCU , ggmsa , ggmugs , ggmuller , ggmulti , ggnormalviolin , ggpage , ggpca , ggpcp , ggpedigree , ggperiodic , ggpicrust2 , ggplate , ggplotAssist , ggpmisc , ggPMX , ggpop , ggpp , ggpubr , ggQQunif , ggquickeda , ggRandomForests , ggraph , ggreveal , ggRtsy , ggsankeyfier , ggsc , ggseg , ggseg.formats , ggseg3d , ggsem , ggseqalign , ggseqplot , ggskewboxplots , ggsolvencyii , ggsom , ggstackplot , ggstats , ggstatsplot , ggstudent , ggsurveillance , ggsurvfit , ggtibble , ggtime , ggtree , ggtreebar , ggtreeSpace , ggvegan , ggvenn , ggVennDiagram , ggvis , ggvolc , ghclass , GHCNr , GHRexplore , GHRmodel , ghypernet , gibasa , gibble , gie , GIFT , GillespieSSA2 , gimap , GimmeMyPlot , GimmeMyStats , GiniDecompLY , gINTomics , gipsDA , GISSB , gistr , GitAI , gitdown , gitear , githubr , gitlabr , GitStats , glme , glmfitmiss , glmmfields , GlmSimulatoR , glmSparseNet , globaltrends , gloBFPr , glorenz , glossa , glossr , glscalibrator , glsm , glyparse , glyrepr , gmgm , gMOIP , gmoTree , gms , gmwmx2 , GNET2 , godley , gofreg , goldilocks , golfastr , gompertztrunc , Goodreader , googleAnalyticsR , googlenlp , googleTagManageR , googletraffic , govinfoR , GowerSom , gpbStat , gpcp , GPflexViz , GPL2025 , gprofiler2 , GPSCDF , gptzeror , gpyramid , GRAB , GrafGen , grafify , GRaNIE , granovaGG , grantham , grapesAgri1 , graphicalVAR , graphPAF , gratia , gratis , gravitas , gravity , GREENeR , greenfeedr , greenR , greenSD , Greg , gregRy , GRIN2 , grizbayr , grmtree , grobblR , groupdata2 , grouper , groupr , growthcleanr , GrowthCurveME , growthPheno , growthTrendR , GRShiny , grwat , GSABenchmark , gscramble , gsDesign , gsDesign2 , GSEAmining , gsMeanFreq , gspcr , gstar , gt , gtakeout , GTAPViz , GTEs , gtexr , gtExtras , gtexture , gtreg , gtregression , gtsummary , guardianapi , guideR , GUIDEseq , guildai , gumboot , gunsales , gutenbergr , gvcR , gwaRs , gwas2crispr , gwasforest , gwasrapidd , GWENA , GWlasso , GWpcor , gwpcormapper , h3sdm , hablar , habtools , HaDeX , HaDeX2 , hahmmr , hakaiApi , haldensify , halfmoon , hammers , handwriter , handwriterApp , handwriterRF , HaploDiploidEquilibrium , HaploVar , harbinger , harmony , harrietr , hatchR , hbamr , hcruR , HCUPtools , hdbcp , hdf5r.Extra , hdImpute , hdMTD , hdpGLM , HDStIM , HDXBoxeR , hdxmsqc , headliner , healthbR , healthdb , healthequal , healthiar , HealthMarkers , healthyR , healthyR.ai , healthyR.data , healthyR.ts , heapsofpapers , heartbeatr , heemod , heiscore , helsinki , hemispheR , henna , hermes , HEssRNA , hetcorFS , HGC , hgnc , hgutils , HHBayes , hhmR , HiBED , HicAggR , HiCaptuRe , HiCDCPlus , HiCExperiment , HiContacts , HiCool , hicream , hidecan , highcharter , highlightr , highMLR , hildareadR , himach , hipathia , hipecR , HIPPO , historicalborrow , historicalborrowlong , HIViz , hJAM , hlaR , HLAtools , HLMdiag , hlmLab , HMDA , hmde , HMDHFDplus , hmer , hmetad , hmix , HMP16SData , HMP2Data , HNPclassifier , hockeystick , HodgesTools , holideh , holobiont , holodeck , HoloFoodR , Holomics , homologene , HonestDiD , hoopR , horsey , HotellingEllipse , hours2lessons , HPAanalyze , HPiP , hpiR , HPZoneAPI , HRTnomaly , hsrecombi , htetree , htrSPRanalysis , HTSeed , htsr , httk , hubeau , hubEnsembles , HuBMAPR , HubPub , HuraultMisc , hurricaneexposure , HVT , hwsdr , hybridEHR , hydrodownloadR , hydroloom , hydroroute , HyMETT , hypeR , hyperbolicDEA , hypercube , hyperSpec , hypervolume , HYPEtools , hypothesisr , HZIP , i3pack , iadf , IATscores , ibawds , ibb , IBCF.MTME , IBDInfer , ibger , IBLM , IBMPopSim , icardaFIGSr , ICBioMark , iccCompare , iccCounts , iccTraj , ICD10gm , icdpicr2 , ICEHmeasures , iCNV , iCOBRA , icpack , ICSKAT , idbr , idcnrba , IDE , ideal , idealstan , ideamdb , ideanet , idefix , idiffomix , idiogramFISH , idiolect , idionomics , idmc , idpr , idr2d , IETD , ieugwasr , IFMCDM , ig.degree.betweenness , iglu , iheiddown , ihpdr , ihsMW , IHWpaper , iimi , ijtiff , il.cbs.muni , ILORA , ILoReg , ILRCM , imageFeatureTCGA , imageseg , imageTCGA , imageTCGAutils , imaginator , imanr , ImCluster , imcRtools , IMD , imdbapi , imfapi , imfweo , imgpalr , imgrec , ImML , immunarch , immunaut , immunogenetr , iModMix , IMP , impactflu , impectR , important , importinegi , imprinting , imputeREE , imputeTestbench , imt , ImVol , incgraph , incidence2 , IncidencePrevalence , inctools , inDAGO , indexr , IndiAPIs , indonesiaFootballScoutR , IndonesiAPIs , industRial , ineAtlas , iNEXT.3D , iNEXT.4steps , iNEXT.beta3D , infer , infercnv , inferCSN , infiltrodiscR , Inflongitudinal , influenceAUC , influxdbr , infoelectoral , InformativeCensoring , InjurySeverityScore , injurytools , inkaR , inlabru , inlamemi , ino , InPAS , insane , InsectLabelR , insee , insurancerating , InsuSensCalc , int3ract , integrity , intensegRid , InteractionPoweR , interca , InterCellar , interfacer , interplot , interpretCI , intervalpsych , intmed , INTRIGUE , intRinsic , intsvy , invacost , inventorize , invitroTKstats , invivoPKfit , iNZightPlots , iNZightRegression , iNZightTools , iNZightTS , IOBR , IONiseR , iotables , ip2location.io , ipanema , ipeadatar , IPEDS , IPEDSuploadables , ipfr , ipft , ipolygrowth , ipumsr , ir , iraceplot , IRexamples , iRfcb , IRISMustangMetrics , irpfR , irrCAC , IRTM , irtQ , ISAnalytics , ISCA , Isinglandr , IsingSampler , ismtchile , ISO11784Tools , isobxr , IsoCorrectoR , IsoformSwitchAnalyzeR , isomiRs , isoniche , isoorbi , ispdata , ISRaD , istat , istatR , iSTAY , itmsa , ITNr , itol.toolkit , itscalledsoccer , itsdm , iucnr , ivo.table , ivolcano , IVPP , ixplorer , izmir , jackstrap , jadeLizardOptions , JamendoR , janitor , janus , JapanAPIs , japanstat , jazzPanda , JBrowseR , jellyfisher , jenga , jmastats , JMbdirect , jmBIG , JMH , jmv , JohnsonKinaseData , joinpointR , jointCompRisk , jollofR , jpcity , jpgrid , jpinfect , jpstat , jrt , JSDNE , JSmediation , jsonstat , jstable , jstager , jubilee , juicedown , junco , just.install , k5 , kaigiroku , karyotapR , katdetectr , kayadata , kbal , Kcop , KCSKNNShiny , KCSNBShiny , kdps , kendallRandomWalks , kerasnip , Kernelheaping , kernelPhil , kerntools , kesernetwork , keyATM , keyed , keyholder , kfino , kgraph , kindisperse , kindling , kitesquare , kiwisR , klovan , knfi , KNNShiny , knobi , knowYourCG , kntnr , KoboconnectR , kollaR , konfound , KrakenR , KraljicMatrix , kssa , kuzco , kvkapiR , l1rotation , l1spectral , labelled , labNorm , LABTNSCPSS , LACE , lacrmr , lactater , LAD , LadderFuelsR , LAGOSNE , Lahman , LAIr , Landmarking , lans2r , laOpenData , lapop , lares , lareshiny , LARisk , latbias , LATERmodel , latte , lavaanPlot , layer , lazysf , lazytrade , lboxcox , LBSPR , lcmsPlot , LCPA , lcsm , lddmm , leadeR , LeadSense , leaf , leafpm , leapR , learningtower , LearnVizLMM , ledger , lefser , LegATo , legislatoR , lehdr , lehuynh , letsHerp , letsRept , levi , LexisPlotR , lfproQC , LGDtoolkit , libr , licoread , LifeInsureR , LifemapR , lifeR , LightLogR , likelihoodTools , LikertMakeR , lilikoi , lillies , LilRhino , limpca , LimROTS , lineagefreq , lineartestr , linelistBayes , linkspotter , lipidomeR , LipidomicsR , lipidr , LipidTrend , lisaClust , lisat , LitFetchR , litRiddle , litteR , live , LLMAgentR , llmclean , llmhelper , LLMR , LLSR , lmap , lmeresampler , lobby , lobbyR , lobsteR , localsp , locuszoomr , loewesadditivity , LOGAN , logolink , logos , logrx , long2lstmarray , LongDat , longitudinalcascade , longke , longreadvqs , longsurr , LorMe , lpanda , LPDynR , lpirfs , LRcell , LSAMBA , lsirm12pl , lsm , lspartition , LSTbook , LTASR , ltc , lterpalettefinder , ltertools , LTFGRS , LTFHPlus , lulab.utils , lvmisc , lvnet , lwc2022 , LymphoSeq , M2SMF , M2SMJF , M3JF , m6Aboost , Maaslin2 , macleish , macrosyntR , MadanText , MadanTextNetwork , madshapR , maestro , MAFLD , MAGMA.R , MagmaClustR , MAGNAMWAR , MAICtools , MAIHDA , MainExistingDatasets , makeFlow , malariaAtlas , malaytextr , maldipickr , mall , manifestoR , MannWhitneyCopula , MantaID , mantis , manureshed , manydist , ManyIVsNets , manymodelr , manynet , mapbayr , mapboxapi , mapcan , MAPCtools , mapedit , mapindiatools , Mapinguari , mapme.biodiversity , mapmixture , mappestRisk , mappoly , maraca , margaret , marinepredator , mariner , MariNET , MarketMatching , marketr , markets , markovmix , markowitz , markstat , marr , mase , maser , maskRangeR , MassWateR , mastR , matlib , matman , MatrixQCvis , matrixset , matriz , matsbyname , matsindf , matuR , maxaltall , maxcombo , MazamaCoreUtils , MazamaLocationUtils , MazamaSpatialPlots , MazamaSpatialUtils , MazamaTimeSeries , MBECS , MBMethPred , MBNMAdose , MBNMAtime , mbQTL , mbRes , MBRM , mbX , mccount , mclink , mclm , MCM , mcmodule , mcmsector , mcmsupply , MCOE , mcp , MCPModBC , mcradds , mcStats , mctq , MCTrend , mcvis , mda.biber , mdbplyr , mde , MDPIexploreR , MDSPCAShiny , mdsr , MEAanalysis , meantables , measr , MeasurementDiagnostics , measureR , MEAT , MECfda , meconetcomp , mectx , meddra.read , medfateland , medrxivr , MedxR , meerva , meetupr , megadepth , melidosData , meltt , mem , memapp , memes , mergingTools , merTools , MesKit , messaging , messy , messy.cats , messydates , meta , metabCombiner , metaboData , MetaboDynamics , metabolic , MetabolicSurv , MetabolicSyndrome , metaCluster , metacoder , metaconfoundr , metacore , metadeconfoundR , metaGE , metagene2 , metagroup , MetaHD , metalcor , MetAlyzer , metamisc , metamorphr , metan , MetaNet , metanetwork , metaplot , metapower , metaprotr , MetaProViz , metaquant , MetaRVM , MetaScope , metasnf , metasplines , metatools , MetaUtility , metaviz , metawho , meteo , meteoland , meteospain , methcon5 , methodical , MethodOpt , MethReg , MethScope , methylCC , methylclock , MetMashR , MetNet , metrica , MetricGraph , metricminer , MetSizeR , MexicoDataAPI , MF.beta4 , mfcurve , MFO , mfrmr , mgi.report.reader , MGnifyR , mgwrhw , mgwrsar , MHQoL , mia , MIAmaxent , miaTime , miaViz , MIC , mice , miceafter , micer , microbial , microbiome , microbiomeExplorer , MicrobiomeStat , MicrobiomeSurv , MicrobiotaProcess , MicrobTiSDA , microdiluteR , microeco , microinverterdata , midasHLA , mifa , MIGEE , migest , mighty.metadata , migraph , migrate , MigrationDetectR , mikropml , mildsvm , miloR , MIMER , MIMSunit , mimsy , mind , mineSweepR , miniLNM , minorparties , mintyr , mipplot , miRLAB , mirTarRnaSeq , misc , misl , mispitools , missCompare , MissingHandle , mistyR , mitch , mitre , mixediffusion , MixedPsy , MixLFA , MixMashNet , mixOmics , mixpoissonreg , mixtur , mizer , mKBO , MLDataR , mlfit , MLFS , mLLMCelltype , MLmorph , MLMusingR , mlr3shiny , mlrpro , mlspatial , mlstrOpalr , mlts , mlVAR , MLwrap , MLZ , MM4LMM , mmaqshiny , mMARCH.AC , Mmcsd , MMUPHin , mobileRNA , Modelcharts , modeldata , modeldb , modeldiagramR , modelimpact , modelSelection , modeltests , modeltime , modeltime.ensemble , modeltime.resample , moderndive , ModEstM , modisfast , modsem , MOFA2 , MoleculeExperiment , MolgenisArmadillo , MOMA , mombf , mongolstats , monobinShiny , monocle , monoClust , moodef , moodleR , Moonlight2R , morse , mortSOA , mosaic , mosaicCalc , mosaicCore , MOSim , motherduck , MotifPeeker , motifr , MouseFM , mousetrap , move2 , movedesign , moveEZ , movegroup , movementsync , mpathr , mpathsenser , MPI , mpindex , mplot , MplusLGM , mplusParallel.automation , mpmsim , mpower , mppR , mpwR , mregions2 , mrf2d , MRFcov , MRG , mrgsim.parallel , mrgsim.sa , mrgsolve , mrIML , mrPStrata , MRStdCRT , MRStdLCRT , MSA2dist , MSclassifR , mscstexta4r , MSEtool , msig , msigdbr , mSigPlot , msImpute , MSMGOptimizer , MSnID , MSoutcomes , mspms , MSPrep , msPurity , msqrob2 , msSPChelpR , MSstatsBig , MSstatsLiP , MSstatsPTM , MSstatsQC , MSstatsQCgui , MSstatsResponse , MSstatsShiny , mstATA , mt.surv , mtaOpenData , mtdesign , mtrank , mtscr , mtvc , MUACz , mudfold , MUGS , muir , mulea , mulgar , multibias , multibiasmeta , multibreakeR , multid , multidplyr , multifear , multifunc , multiGSEA , multiHiCcompare , multilevelmod , multilevLCA , multimedia , multiMiR , multiModTest , multimorbidity , multinma , multiobjectiveMDP , MultiObjMatch , multipleITScontrol , multipleOutcomes , MultiplierDEA , multiSA , MultiscaleDTM , multiScaleR , MultiscaleSCP , multiscape , MultiSpline , multistateQTL , multitool , MultiTraits , multivarious , multiverse , multiWGCNA , multpois , MungeSumstats , MuPETFlow , muscat , musicatk , MutationalPatterns , mutscan , MutSeqR , MUVR2 , mverse , mvgam , mvMAPIT , mvMonitoring , MVN , mvnma , mwlaxeref , mwmap , mxfda , mxnorm , mxsem , myClim , myTAI , nadir , NaileR , name , namedropR , namer , nandb , naniar , NanoMethViz , nanostringr , NAPrior , naryn , nasa , nasadata , nascaR.data , NBAloveR , nbapalettes , NBDCtools , NBShiny , NBShiny2 , NBShiny3 , nbTransmission , ncaavolleyballr , ncappc , ncdfgeom , ncmeta , ncmR , ndi , nearBynding , neatmaps , necountries , NeEDS4BigData , negligible , Neighboot , Nematode , nemsqar , nemtr , neonPlantEcology , neonSoilFlux , neonUtilities , neotoma2 , nestedLogit , NestMRMC , netcom , NetCoupler , netdose , NetGreg , netgsa , netknitr , netmeta , netmhc2pan , NetOrigin , netprioR , netrics , NetSci , netseer , netSEM , NetworkComparr , NetworkExtinction , networkLite , NetworkRiskMeasures , networkscaleup , NeuralSens , NeuroDecodeR , neuromapr , neuromplex , neuroSCC , neuroUp , neutralitytestr , nevada , nfl4th , nflfastR , nflseedR , ngboostForecast , ngramr , ngsReports , nhanesA , nhanesdata , nhdplusTools , nhdR , NHSDataDictionaRy , NHSRplotthedots , NHSRwaitinglist , niarules , nichetools , NiLeDAM , nima , NIMAA , nipalsMCIA , nixmass , nixtlar , nlive , nlmixr2 , nlmixr2auto , nlmixr2autoinit , nlmixr2extra , nlmixr2rpt , nlpsem , nlrx , nls.multstart , NMAforest , nmarank , Nmisc , NMTox , nncc , nndiagram , nntmvn , noah , NobBS , node2vec , noisyr , nomesbr , nominatimlite , nomisdata , nomiShape , nonmemica , NoRCE , normaliseR , NormalityAssessment , NormData , nos , notame , notameStats , notameViz , notifyme , notionR , NOVA , nowcastr , NPARC , NPBayesImputeCat , npcs , npdsim , npi , NPIstats , NPLStoolbox , nplyr , NPStability , nrba , nrlR , nser , NSMM , nucleR , NUETON , nuggets , nullabor , numbat , NUSS , nuts , NVAR , nycOpenData , nysOpenData , nzilbb.vowels , o2plsda , OAtools , obcost , OBL , obliqueRSF , oceanexplorer , ocf , ocrRBBR , octopus , oddnet , oddsapiR , oddstream , odeGUTS , oeli , oenb , officer , ofpetrial , ogrdbstats , OhdsiReportGenerator , OhdsiShinyAppBuilder , ohenery , ohvbd , ojsr , OlinkAnalyze , OlympicRshiny , OmicsMLRepoR , OmicsPLS , omicsTools , omicwas , Omixer , OmnipathR , omock , OmopConstructor , omopgenerics , OmopOnSpark , OmopSketch , OmopViewer , omsvg , omu , omXplore , ONAM , onbrand , oncmap , OncoBayes2 , OncoSimulR , OncoSubtype , One4All , OneArmTTE , onemap , onemapsgapi , OneSampleLogRankTest , OnlineSurr , ontoFAST , ontophylo , ontoProc , openair , openairmaps , openappr , openbankeR , opencage , opendotaR , openesm , OpEnHiMR , openMSE , openNCAI , openPrimeR , OpenRepGrid , OpenRepGrid.ic , openscoring , OpenSourceAP.DownloadR , opGMMassessment , opinAr , OPL , optedr , optic , optimall , optimLanduse , optmatch , oRaklE , OralOpioids , Orangutan , orbital , orbitr , ordbetareg , orderanalyzer , ordinalGOF , ordinalsimr , ordr , ORFID , OrgHeatmap , orisma , orthogene , orthos , osdc , OSNMTF , otargen , otpr , OTrecod , OtsuFire , ottrpal , ouladFormat , OutliersO3 , outstandR , ovbsa , overturemapsr , overtureR , overviewR , OVtool , owdbr , OxSR , oysteR , oystermapR , PAC , pacheck , pacta.loanbook , pacta.multi.loanbook , PACVr , padr , pairwiseLLM , paisaje , PakPC2017 , palaeoSig , PamBinaries , PAMmisc , pammtools , PAMscapes , pandemonium , panelr , panelsummary , panelView , pannotator , PanomiR , parafac4microbiome , ParamANOVA , parasiteR , parcats , PaRe , parquetize , parsermd , parSim , parsnip , particles , partition , partR2 , passt , PAST , patentr , pathlinkR , pathMED , PathoStat , pathviewr , PatientGenerator , PatientLevelPrediction , PatientProfiles , patrick , patternize , patternplot , PAutilities , pbANOVA , pbkrtest , PCBS , pccc , PCGII , pcpr , pctax , pcutils , pda , PDATK , pdfetch , pdi , PDtoolkit , pdxTrees , peacesciencer , peakCombiner , PEAXAI , pecan , Pedixplorer , pedtricks , PEIMAN2 , pems.utils , pencal , penppml , pep725 , pepdiff , pepe , peppwR , PepSetTest , peptoolkit , peramo , percentiles , PERK , permRand , permubiome , PeruAPIs , peruflorads43 , perumammals , pervasive , PesticideLoadIndicator , pestr , petersenlab , PFW , pfwim , pguIMP , pgxRpi , phacking , phantSEM , phase1PRMD , phecodemap , PHEindicatormethods , phenofit , PhenoGeneRanker , phenopath , PhenoSpectra , PhenotypeR , PheVis , phonetisr , PhosR , photobiology , photobiologyInOut , photosynthesis , phsmethods , phsopendata , phylepic , PhyloProfile , phyr , PiC , PICB , pickmax , piecenorms , PieGlyph , Pigengene , pingers , PINstimation , pintervals , pipeComp , PIPETS , pivotea , pivottabler , piwikproR , pixieweb , pixr , PJCcalculator , PKbioanalysis , pkgdepR , pkggraph , pkgGraphR , pkgstats , pkmapr , PKNCA , PL94171 , placematchr , planet , planr , planscorer , plasmut , plater , PlateVision , plausibounds , player , PlayerChart , pleioh2g , pliman , plinkQC , PLNmodels , plot3logit , plotdap , plotgardener , plotGrouper , plotlsirm , plotly , plotor , plotthis , plsmmLasso , plsmod , plsmselect , PLUCR , plume , plutor , plyinteractions , plyxp , pmartR , pmc , pmetar , pmev , pmrm , PMScanR , pmxcode , pmxTools , PNADcIBGE , PND.heter.cluster , PNDSIBGE , PNSIBGE , PnT , PoDBAY , pointblank , PointedSDMs , poissonreg , polarisR , poldis , polimetrics , polished , PolisheR , politeness , pollen , pollster , polyglotr , polymatching , Polytect , POMA , POMADE , pomcheckr , pooledpeaks , PoolTestR , PopComm , PopED , PopGenHelpR , poppr , PopPsiSeqR , popPyramid , popstudy , PopulateR , PopulationGrowthR , populR , PortalHacienda , portalr , portvine , posDemux , postcard , postGGIR , postNet , powerbrmsINLA , PoweREST , powerjoin , powerprior , PowRPriori , PPbigdata , ppcseq , ppcSpatial , ppendemic , PPforest , ppmf , pprof , ppseq , PracticalEquiDesign , PracTools , PRANA , prcr , PRECAST , precisely , precmed , precviasBR , predict3d , predictNMB , predictoR , predictrace , predtools , prefio , prefviz , pregnancy , prepdat , PREPShiny , presenter , pressuRe , pretestcad , prettyPanelMatch , preventr , prevtoinc , pRF , PriceIndices , priceR , prider , primirTSS , PrInCE , prioriactions , priorityelasticnet , prism , prismadiagramR , proActiv , ProActive , ProAE , probably , proBatch , processcheckR , processmapR , processmonitR , processpredictR , ProduceR , progeny , projectLSA , projectR , projects , projoint , pRolocGUI , promptr , PRONE , prophet , proPubBills , ProPublicaR , ProSportsDraftData , protag , protein8k , ProteinGymR , ProteoBayes , ProteoDisco , proteus , protti , provExplainR , provolleyballr , ProxReg , prozor , PSAWR , psborrow , pseudobibeR , pseudohouseholds , psfmi , psHarmonize , psichomics , psidread , PSIM , PSLM2015 , psm3mkv , psmineR , PSor , pspatreg , PSPI , psre , psrwe , PSS.Health , psycCleaning , psychmeta , psycho , psychonetrics , psychReport , PsychWordVec , psyntur , ptetools , PTSDdiag , pubchem.bio , PubChemR , pubh , public.ctn0094extra , PublicationBias , pubmedtk , pubrplot , puff , puls , PUMP , pureseqtmr , PurpleAir , purrrlyr , puzzle , Pv3Rs , pvda , PvSTATEM , pwr2ppl , pxmake , pysparklyr , qad , qape , qbr , qccrs , qch , qdap , qDEA , QFASA , QGameTheory , qmd , qmj , QoLMiss , qPCRhelper , qPCRtools , qPLEXanalyzer , Qploidy , qpNCA , qPRAentry , qqplotr , qrlabelr , QRscore , QsRutils , qst , qsub , qsvaR , qtkit , qtl2ggplot , qtl2pattern , qtl2pleio , QTLExperiment , quadkeyr , quadVAR , qualitycontrol , quallmer.app , qualmap , qualtRics , quantbayes , quanteda.tidy , queryBuilder , queuecomputer , QuickExplore , quickPWCR , QuICSeedR , quid , quollr , qvirus , R.AlphA.Home , r2dii.analysis , r2dii.match , r2dii.plot , r2mlm , R4GoodPersonalFinances , r4lineups , r4pde , r4ss , r4subrisk , r4subscore , r4subtrace , r6methods , R6P , r6qualitytools , racademyocean , rAccess , Racmacs , rACMEMEEV , ractivecampaign , rADA , RadEro , RadialVisGadgets , radiant.basics , radiant.design , radiant.model , radiant.multivariate , radsafer , Radviz , RAGFlowChainR , ragnar , rai , rainerosr , rainette , rairtable , ralger , rameritrade , rando , random.cdisc.data , randomForestExplainer , randomForestVIP , randomizeR , RandomWalker , randotools , RankMap , Rapi , rapidcodeR , RapidoPGS , rappleads , rappsflyer , rapsimng , raptools , RAQSAPI , rar , RareComb , RARfreq , rassta , RastaRocket , rATTAINS , rattle , ravelRy , RavenR , rawDiag , RawHummus , rawKS , rb3 , RBaseX , rbbnp , Rbearcat , RBesT , rbgm , rbiodatacr , rbiom , rbmiUtils , rbw , rcausim , rcbayes , rcdf , RChASM , rChEA3 , rciplot , rcldf , RClickhouse , RClimacell , RcmdrPlugin.RiskDemo , rcoder , rCoinbase , rcoins , RColetum , Rcompadre , rcontroll , Rcope , rCoreGage , rcprd , rcrisp , rcrossref , rcssci , RCT , RCTrep , RCTS , Rcurvep , rDataPipeline , rdcmchecks , rdflib , Rdistance , rdlearn , rdomains , rdss , reactable.extras , ReactomeGSA , readabs , readaec , readapra , readepi , readmit , readosense , readrba , readsdr , readtextgrid , ready4 , readyomics , reappraised , rearrr , rebird , recalibratiNN , recastlessons , recforest , recmetrics , recodeflow , reconstructKM , REDCapCAST , REDCapDM , REDCapR , REDCapSync , REDCapTidieR , REddyProc , REDI , redist , redistmetrics , redlist , redquack , ref.ICAR , refdb , refitgaps , refitME , refreshr , REFT , refuge , refund.shiny , RegCombin , RegDDM , regextable , regionalpcs , RegionalST , regions , registr , regport , RegrCoeffsExplorer , regress3d , regressinator , regressoR , regrrr , Relectoral , reliabilitydiag , REMixed , rempsyc , repana , RepeatedHighDim , repfun , repoRter.nih , ReporterScore , reportRmd , ReportSubtotal , representr , reproducer , REPS , rerddap , rerddapXtracto , reservoirnet , RESIDE , ResIN , reslr , respirometry , respR , ResultModelManager , resumer , ReSurv , retimer , retmort , retroharmonize , reval , reveneraR , RevGadgets , ReviewR , revise , reviser , REXoplanets , rextendr , rextor , rfacebookstat , rfars , rFIA , rfieldclimate , rfishbase , rfm , rfPermute , RFPM , rfriend , rFUSION , rfVarImpOOB , rgenius , Rgff , rgoogleads , rgoogleclassroom , rgoslin , rgsp , RHclust , rIACI , riAFTBART , RiboCrypt , ribor , riceidconverter , richCluster , Ricrt , rict , Riex , rifi , rifiComparative , rifttable , Rigma , rigvf , Rilostat , RImmPort , ripc , risk.assessr , riskCommunicator , riskdiff , RiskMap , risks , riskscores , RItools , riverconn , RivRetrieve , rjaf , RJafroc , rKIN , rKolada , rKOMICS , RKorAPClient , rLakeHabitat , rliger , rlinkedinads , rmapzen , RMassBank , RMAT , RMCDA , rmcfs , rmdcev , rmdd , RMeDPower2 , rmedsem , rmlnomogram , RMM , Rmonize , rmsfuns , rmstcompsens , RMSTpowerBoost , rmweather , rmytarget , RNAseqCovarImpute , RNAseqQC , RnaSeqSampleSize , RNAshapeQC , RNeXML , rnpn , roadDB , roadoi , roads , roahd , robCompositions , RobinCar , RobinHood , robis , RobMixReg , robomit , robotoolbox , robustT2 , Robyn , rockx , roclab , roclang , ROCModels , ROCnGO , rocnp , rolap , rollama , rollout , ROMDB , RoME , romic , ropercenter , roroph , rorqual.morpho , roundwork , rpcss , rPDBapi , rplanes , rplec , rpm , rPraat , rPref , RPresto , Rprofet , rprojtree , RQdeltaCT , rrda , Rrepest , rrr , rsample , rscopus , rscorecard , RSD , RSDA , Rsearch , rsemmed , rshift , rsinaica , rsmatch , Rsmlx , rsnell , rsocialwatcher , rsofun , rspacer , rSPARCS , Rspotify , rsppfp , rSRD , RSSL , rstanemax , RStanTVA , rstatix , RStoolbox , rStrava , rstudio.prefs , rstudiothemes , rsurv , rsurvstat , RTCGA , RTD , rtForecastEval , rTG , rtgstat , Rthingsboard , rticulate , rtiktokads , RTL , rtodoist , rtoot , rtpcr , rtrek , rtrends , rtry , RtsEva , Rtumblr , rtypeform , RUCova , ruler , rules , rUM , ruminate , rurality , rusk , rvertnet , rvkstat , rvolleydata , rwa , rwalkr , rwarrior , RWDataPlyr , rWikiPathways , rwunderground , ryandexdirect , rytstat , rzentra , s3 , S4DM , sabre , sae.projection , sae4health , saebnocov , saeczi , saeHB.panel.beta , saeHB.unit , saens , saePseudo , saeSim , safejoin , safestats , SafeVote , salesforcer , salmonMSE , sampbias , sampcompR , sampler , samplingin , samplingR , sampsizeval , SAMtool , SanFranBeachWater , SangerTools , sapfluxnetr , saqgetr , SAR , saros , saros.base , saseR , sazedR , sbd , sbm , SBMTrees , sboost , scafari , scaledescr , scAnnotatR , scanstatistics , scaper , scatterbar , scatterpie , scBubbletree , sccca , sccomp , sccore , sccr , scCustomize , SCDA , SCDB , scDesign3 , scdhlm , scDotPlot , scds , scECODA , scenfire , scFeatureFilter , scFeatures , SCFMonitor , scGate , scGOclust , scGPS , scGraphVerse , scgwr , schemr , schex , scHiCcompare , scholar , SchoolDataIT , schwabr , SCIBER , scicomptools , scifer , scimetr , scimo , scipub , scistreer , scITD , scLANE , scLang , scmap , scMET , scMetaTraj , scMultiSim , Sconify , scoper , SCoRES , SCORPION , scPCA , scperturbR , scpi , scPipe , scPloidy , scpoisson , scQTLtools , scR , ScreenR , screenshot , scRepertoire , ScriptMapR , scRNAstat , scrutiny , scrutr , scryr , scSpatialSIM , SCtools , scToppR , sctransform , scTypeEval , sdamr , sdbuildR , SDCNway , SDGdetector , SDLfilter , sdsfun , sdtm.oak , sdtm.terminology , sdtmchecks , sdtmval , SEAHORS , seahtrue , SeaSondeR , secrettext , sectorgap , secuTrialR , sedproxy , seecolor , SeedMaker , seer , segclust2d , sehrnett , SEIRfansy , sejmRP , SelfControlledCaseSeries , seliNDRIx , SemanticDistance , semdrw , semEffect , SemNeT , SEMsensitivity , semtree , senatebR , sendigR , senseweight , SensIAT , sensortowerR , seqCAT , seqimpute , seqSHP , seqtrie , sergeant , serocalculator , serofoi , SerolyzeR , serosv , SeroTrackR , sesame , SETA , settingsSync , setweaver , SeuratExplorer , sfarrow , sfclust , sfcr , sfdct , sfhelper , sfislands , sfnetworks , sfReapportion , sgapi , sgboost , sgsR , sgstar , shadowVIMP , SHAKTI , ShapleyOutlier , SHARK4R , SharkDemography , shazam , ShellChron , sherlock , shewhartr , shiny.telemetry , shinyauthr , shinyCLT , shinyCohortBuilder , shinyDSP , shinyepico , shinyExprPortal , shinyHeatmaply , shinyHugePlot , shinyInvoice , ShinyItemAnalysis , shinyloadtest , shinymodels , shinymrp , shinyNotes , shinyobjects , shinyproxyLogs , ShinyQuickStarter , shinyr , shinyrecipes , shinySbm , shinyWGD , shorm , SIAmodules , SIBER , sicegar , siconvr , siera , sigmajs , sigminer , Signac , signatureSearch , signatureSearchData , signeR , signifinder , Silhouette , silicate , silviculture , sim2Dpredictr , simaerep , SimBIID , SimBu , simCAT , SimDesign , simDNAmixtures , SimEngine , simET , SimFFPE , simglm , SimKid , simlandr , simmer.plot , simMetric , SimNPH , simodels , simPH , simplanonym , simplecolors , simpleFDR , SimpleUpset , simplifyNet , SimplyAgree , simpowa , SimSST , SimtablR , simTool , simts , simulateDCE , SimuRg , SingleCaseES , SingleCellComplexHeatMap , singleCellTK , SingleMoleculeFootprinting , SIRE , SISIR , sistec , sistmr , sitar , sitepickR , siteymlgen , sits , sixtyfour , SiZer , sjmisc , sjPlot , skater , SkeletalVis , sketcher , sketchR , skewlmm , skilljaR , skimr , skytrackr , slackr , SLCARE , slendr , Slick , SlideCNA , SlimR , SLOS , SMAD , smartid , SmartPhos , smartsheetr , smdi , smer , smidm , smimodel , SMMT , smoothic , SmoothPLS , smoothy , smplot2 , sMTL , snap , snapr , snazzieR , snotelr , snowquery , snpAIMeR , socialdrift , socialh , socialrisk , sociome , socviz , softwareRisk , SOHPIE , soilFlux , SoilManageR , soiltestcorr , soiltillr , Sojourn , solrium , SomaDataIO , SOMEnv , somhca , SOMnmR , sorvi , sosta , soundClass , sourcoise , sov , SpaCCI , SpaceMarkers , SpaceTrooper , spada , Spaniel , spanishoddata , spanner , sparkavro , sparkhail , sparklyr , sparklyr.flint , sparklyr.nested , sparqlr , sparsediscrim , sparseR , SPARTAAS , spaSim , SpatFD , spatgeom , SpatialArtifacts , spatialAtomizeR , SpatialCPie , spatialFDA , spatialGE , spatialHeatmap , SpatialKDE , spatialLIBD , SpatialOmicsOverlay , SpatialRDD , spatialRegroup , spatialRF , spatialrisk , spatialsample , spatialTIME , spatPomp , spbabel , spDates , spdesign , speccurvieR , specr , spectrakit , spectralR , SpectralTAD , Spectran , spEDM , speech , speechbr , speedycode , speedytax , spellcheckr , sperrorest , SPIAT , SPICEY , spicy , spicyR , spillR , spinebil , SpliceImpactR , splicelogic , SplineDV , splinetrials , splithalf , splithalfr , spnaf , SpNeigh , SpoMAG , SPONGE , SportMiner , SpotClean , spotidy , spotifyr , spotoroo , SppTrend , spqdep , sprtt , SQI , SQIpro , sqliteutils , sqlm , squallms , SqueakR , sr , srcr , sRdpData , sreg , sregsurvey , SRMERS , srppp , SRscore , srvyr , ssddata , ssebiEF , SSHAARP , sshicm , ssimparser , sSNAPPY , SSNbayes , SSNbler , sspm , ssrn , Sstack , SSVS , staat1cho , stabiliser , stability , StabilityApp , staccuracy , StackImpute , stacks , STADyUM , stampr , standR , StanMoMo , staRdom , staRgate , starling , starry , starschemar , starter , starvz , statAfrikR , statar , statdecideR , states , Statial , stationaRy , statioVAR , statnipokladna , stats19 , statsExpressions , statsr , StatsTFLValR , statswalesr , StatTeacherAssistant , stCEG , stcos , stddiff.spark , STDistance , stelfi , stenR , steppedwedge , StepRegShiny , stepssurvey , stevemisc , stgam , stickyr , STICr , SticsRFiles , stJoincount , STMr , stochLAB , StockDistFit , stodom , stoichUtilities , storywranglr , stPipe , stplanr , stppSim , strand , strandCheckR , strata , stratamatch , StratifiedMedicine , StratifiedRF , StratigrapheR , streamDepletr , streetscape , strength , stressor , stRoke , StroupGLMM , structenforcement , StructuralVariantAnnotation , strvalidator , studentlife , studyStrap , StuteTest , SubcellularSpatialData , subincomeR , subscreen , subSeq , subtools , sudachir , sugarglider , sugrrants , sumExtras , summariser , summarySCI , summarytabl , summarytools , Summix , SUMO , sumup , sumvar , sunburstR , sunburstShinyWidget , SunCalcMeeus , SunsVoc , supabaseR , Superpower , supersigs , SuperSurv , SupMZ , supportR , SuRF.vs , suRface.analytics , surfaltr , SurfR , Surrogate , SurrogateRank , survalis , survdnn , surveil , surveybootstrap , surveycore , surveydata , SurveyDefense , surveyexplorer , surveyPrev , SurveyStat , surveytidy , surveyvoi , SurviMChd , survinger , SurvivalClusteringTree , survivalSL , survivalsurrogate , survivoR , survminer , survML , survobj , survout , survParamSim , SurvSparse , survstan , svaNUMT , svaRetro , SveltePlots , SVMDO , SVMMaj , SVP , swaprinc , sweep , swfscDAS , swfscMisc , SwimmeR , swimplot , swissparl , switchde , switchSelection , SWMPr , SWTools , syllabifyr , symphony , symptomcheckR , synaptome.db , SynDI , synergyfinder , SynergyLMM , synthesisr , SynthETIC , syntheticdata , SynthTools , syrup , sysAgNPs , Sysrecon , systemPipeShiny , systemPipeTools , syuzhet , T2DFitTailor , T2Qv , tabbycat , taber , table.express , tabledown , tablespan , tablet , tabnet , tabpfn , tabr , tabs , tabshiftr , tabularaster , tabulator , tabxplor , TADCompare , tagtools , tailor , talkr , tall , tame , tanggle , TangledFeatures , TAPseq , tarchetypes , tardis , TAShiny , tashu , tastypie , tatooheene , taxa , taxadb , taxizedb , taylor , tbl2xts , tbrf , TCGAbiolinks , tcgaViz , TCIU , tcpl , tdcmStan , teal.modules.clinical , teal.modules.general , teal.picks , teal.slice , teal.transform , tealeaves , teamcolors , tectonicr , tEDM , TEKRABber , telemetR , telraamStats , temperatureresponse , Temporal , tenm , tepr , terapadog , tern , tern.mmrm , TernTables , terraTCGAdata , tesouror , test.assessr , TestAnaAPP , testarguments , testdat , TestDimorph , TestGardener , TestGenerator , tetraclasse , text , text2map , text2sdg , texter , TextMiningGUI , textrecipes , textreuse , textstem , TFEA.ChIP , tfrmt , tfrmtbuilder , TFutils , tglkmeans , theft , theftdlc , themis , ThermalSampleR , TheseusPlot , TheSFACE , thinkr , THREC , threesixtygiving , thunder , thurstonianIRT , tibbletime , tidier , tidyactuarial , tidyAML , tidyaudit , tidybayes , tidyBdE , tidybins , tidyboot , tidybulk , tidycat , tidyCDISC , tidycensus , tidycensuskr , tidychangepoint , tidyclust , tidycmprsk , tidycomm , tidycountries , tidyCoverage , tidycwl , tidydelta , tidyDenovix , TidyDensity , tidydfidx , tidydice , tidyedgar , tidyEdSurvey , tidyEmoji , tidyestimate , tidyexposomics , tidyextreme , tidyfinance , tidyfit , tidyFlowCore , tidyfun , tidygam , tidygate , tidyGenR , tidygeocoder , tidygeoRSS , tidygraph , tidyHeatmap , tidyheatmaps , tidyhte , tidyhydat , tidyILD , tidyjson , tidyklips , tidylaslog , tidylda , tidylearn , tidylo , tidylog , tidyLPA , tidyMC , tidymodels , tidymodlr , TidyMultiqc , tidync , tidynorm , tidypaleo , TidyPanel , tidyplots , tidyplus , tidypmc , tidyposterior , tidypredict , tidyprint , tidyprompt , tidyquant , tidyquery , tidyr , tidyrates , tidyREDCap , tidyrgee , tidyrhrv , tidyRSS , tidyrstats , tidysdm , tidyseurat , tidySingleCellExperiment , tidysmd , tidySpatialExperiment , tidyspec , tidysq , tidystopwords , tidySummaries , tidySummarizedExperiment , tidysummary , tidysynth , tidysynthesis , tidyterra , tidytext , tidytlg , tidytransit , tidytreatment , tidytree , tidyttmoment , tidyusmacro , tidyverse , tidywater , tidyweather , tidywikidatar , tigger , tigris , tikatuwq , timbeR , timbr , timefully , timeOmics , timeplyr , timescape , timetk , TimeVizPro , tintin , tinyarray , tinyscholar , tipmap , tipse , tirt , TissueEnrich , TITAN2 , Tivy , tLagPropOdds , tLOH , TmCalculator , Tmisc , tna , tndata , togglr , tomoseqr , tongfen , tools4uplift , toolStability , TOP , topChef , topics , topolow , topr , tourr , toxdrc , toxEval , ToxicoGx , toxSummary , Tplyr , tqk , TR8 , track2KBA , trackdf , TrackTrap , tradeoffaucdim , tradepolicy , TrafficBDE , traineR , trainR , traitstrap , traktok , transforEmotion , transite , transomics2cytoscape , transPlotR , TransProR , traumar , TreatmentPatterns , treeclimbR , treediff , treeheatr , treeio , treekoR , TreeSummarizedExperiment , tReeTraits , trelliscopejs , trendtestR , trendyy , trialr , TrialSimulator , tricycle , TrIdent , TriDimRegression , tRigon , TriLLIEM , trimr , trip , tripr , triptych , troopdata , trps , trud , trustmebro , TSAR , tscv , tsdataleaks , TSDFGS , tsentiment , tsg , tsgc , tsibble , tsibbletalk , tsnet , TSPred , tspredit , TSstudio , tsviz , tswge , ttservice , tuber , tuberculosis , TUFLOWR , tune , turkeyelections , tutorial.helpers , tv , tvmediation , TVMVP , twbparser , twn , TwoDcDAPSA , TwoPhaseCorR , TwoRegression , TwoWayFEWeights , twoxtwo , uavRmp , ubair , ubiquity , ucie , UCSCXenaShiny , UCSCXenaTools , ufs , uisapi , ukbflow , ukc19 , UKgrid , ulex , ulrb , UMI4Cats , umiAnalyzer , UncDecomp , uncertainUCDP , uncmbb , unheadr , unicefData , UniprotR , unityForest , unjoin , unpivotr , unstruwwel , unusualprofile , UpAndDownPlots , UpDown , upstartr , ura , urlexplorer , uscongress , usdampr , usdoj , usedthese , useful , usefun , usemodels , usportsR , ustfd , uteals , utile.tables , utile.visuals , utilsIPEA , UVdose , uxr , vaccine , vachette , vacuum , vagalumeR , vald.extractor , valdr , valdrViz , valet , valhallr , validata , VALIDICLUST , validmind , valr , valuemap , VancouvR , vannstats , varitas , vaxineR , vaxpmx , vazul , vcdExtra , vcfR , vDiveR , VDSM , veesa , vegetablesSriLanka , VennDetail , verdata , verifyr2 , versus , viafoundry , vibass , videogameinsightsR , ViewPipeSteps , viewpoly , viewscape , vigicaen , vimp , ViroReportR , Virusparies , virustotal , viscomp , visdat , ViSe , visiumStitched , vismi , visOmopResults , VISTA , visualFields , visualpred , visvaR , visvow , visxhclust , vitae , vital , vitals , vitopack , vivaglint , vivainsights , vivaldi , vivid , vizdraws , VizModules , VizTest , vmeasur , vmrseq , vmsae , voice , volatilityTrader , volcanoPlot , volker , volrisk , voson.tcn , vosonSML , voteogram , votesmart , VOWR , VoxR , vpc , vsp , vvauditor , vvcanvas , vvconverter , vvfiller , vvmover , vvsculptor , vvtableau , waetr , wakefield , walkboutr , walker , walkscore , wallace , walmartAPI , waou , WAreg , warehouseTools , warmthcompetence , WaterBalanceR , waterquality , Wats , WaveletETS , WaveletGBM , WaveletKNN , WaveletLSTM , waves , waywiser , WBI , wbids , wbstats , wbwdi , wcde , wcep , wcox , wcvpmatch , wdiEF , wdiexplorer , wdnr.gis , weaana , weathR , webchem , webdav , WebGestaltR , WebPower , webr , webSDM , wec , weed , wehoop , weibulltools , WeightedTreemaps , weightedVoronoi , weird , weitrix , Westerlund , wfindr , whapi , whatifbandit , WhatsR , whatthreewords , when , whep , whereport , whippr , whirl , whitewater , whoa , whomds , whSample , wideRhino , widyr , wig , wiggleplotr , wikilake , wikkitidy , wildlifeDI , windAC , windows.pls , wingen , winputall , winr , WinRatio , wizaRdry , wjake , wodds , WoodSimulatR , woodValuationDE , WordListsAnalytics , WordR , workflowsets , workspace , worldfootballR , worldmet , worrrd , woylier , wpa , wpeR , wpm , wppi , WpProj , wqtrends , wrangle , wrappedtools , wrds , wrictools , writeAlizer , writer , WRTDStidal , wru , wsjplot , wsMed , WufooR , wxgenR , x3ptools , xadmix , xCell2 , Xcertainty , xenLite , xesreadR , xgrove , xgxr , xiacf , XKCDdata , xlr , xlsform2word , xmap , xmrr , xpectr , xportr , xpose , xpose.nlmixr2 , xpose.xtras , xpose4 , xray , xrf , XSRecencyX , xtdml , xtsum , xxdi , XYomics , yahoofinancer , yamlet , YAPSA , yardstick , ycevo , YEAB , yfinancer , yfR , yodel , yorkr , yrnd , YTAnalytics , Z10 , z22 , zctaCrosswalk , zdeskR , zenith , zFPKM , ZIDW , zipcodeR , zippeR , zitools , zoltr , ZonationR , zoomerjoin , zoomGroupStats , zoomr , ztype , ZVCV , ZygosityPredictor
Reverse Suggests
abstr , accessr , actfts , actuaRE , adformR , adoptr , AeroEvapR , aesopR , afex , ageutils , aggregateBioVar , agpower , agridat , AHPathbankDbs , AHPtools , AHWikipathwaysDbs , AiES , aimsir17 , aisdk , AlleleShift , alluvial , alone , altair , alternativeSplicingEvents.hg19 , alternativeSplicingEvents.hg38 , amazonadsR , amazons3R , amazonspR , ameras , amp.sim , AMR , anansi , ANCOMBC , ankiR , AnVILAz , aopdata , apache.sedona , appeears , appleadsR , appsflyeR , arcgisgeocode , arcgislayers , archivist , arctools , ards , arenar , aridagri , arkdb , ARPobservation , arrow , arthistory , assemblykor , AssociationExplorer2 , asteRisk , ASURAT , asymptor , atime , atpolR , atrrr , autothresholdr , auxvecLASSO , avilistr , avocado , awinR , AzureCosmosR , azuremlsdk , babelmixr2 , babynamesIL , bage , bagyo , bangladesh , bannerCommenter , BAS , baselinenowcast , BayesianDEB , BayesianQDM , bayesiansurpriser , bbknnR , bbssr , beer , BEMPdata , bench , BerkeleyForestsAnalytics , betaARMA , bfboin , bfsl , bggum , BGmisc , bidask , BiDimRegression , bigPLSR , bigrquery , bigsnpr , bigstatsr , billboard , binford , bingadsR , BiodiversityR , BIOMASS , bioregion , biostat3 , BioWorldR , BiplotML , blends , blosc , blvim , bmlm , bmm , bodenmiller , boinet , bootmlm , box.linters , bpbounds , bpcp , brand.yml , breakaway , brunnermunzel , bscui , BSDA , butcher , CAESAR.Suite , CAISEr , camcorder , campaignmanageR , canvasXpress , canvasXpress.data , carat , CardioDataSets , caRecall , caret , cartographer , cartographr , casebase , cat2cat , catfun , catregs , causaldrf , causalnet , CausalSpline , cbsodataR , cellmigRation , CellNOptR , censo2017 , Certara.RDarwin , cfr , cgmguru , chainbinomial , checkthat , cheem , cheetahR , ChillModels , ChineseNames , clayringsmiletus , cld , ClickHouseHTTP , climate , clinTrialData , clmplus , CluMSID , ClusterBootstrap , clustSIGNAL , clustTMB , cna , codemetar , codingMatrices , codyn , cograph , collapse , collapsibleTree , collateral , colorDF , colorspace , comets , command , complexlm , compositional.mle , comtradr , con2lki , concstats , condathis , confidenceSim , conflicted , conformalForecast , connectapi , connected , constructive , contagionchannels , container , contrast , contrastable , cookiemonster , coronavirus , countfitteR , coveffectsplot , covtracer , cowfootR , cowplot , crimedatasets , crosswalkr , CrownScorchTLS , csdata , csdR , cSEM , cstidy , CTE , ctmle , ctmm , ctmva , ctsGE , Cubist , curatedAdipoChIP , curatedAdipoRNA , curatedTBData , cusumcharter , cv , cvequality , cxr , cyanoFilter , cytofan , CytoPipeline , DAISIE , DAISIEprep , dann , DAPAR , dat , DatabaseConnector , datacommons , datafsm , dataMojo , dataRetrieval , datasauRus , dataset , datasetjson , dataverifyr , datawizard , datplot , dawaR , daymetr , DBI , ddecompose , ddi , ddplot , DeclareDesign , decoder , decontX , DeepLearningCausal , deeplr , deeptime , degday , DelayedTensor , deltatest , DepInfeR , DepthProc , derivmkts , describer , detourr , DevTreatRules , DGEobj , dggridR , dialr , diffdf , DigestiveDataSets , DirectEffects , directlabels , dirichletprocess , disclapmix , discord , discrim , distfromq , dittodb , DNAZooData , dodgr , domir , DoseFinding , DoubleML , DownBallotR , dpkg , dragracer , DrData , DSIR , DSjobtracker , dsTidyverseClient , DT2 , dtlg , duckdb , DyadRatios , dynamite , EbayesThresh , ecb , econdataverse , ecorisk , ecospat , ecostats , ecoteach , ecotourism , ecotox , eddington , edgarWebR , educationR , efdm , EGRET , eia , ELMER.data , emphatic , eodhdR2 , epichains , epidatr , epidm , epigraphdb , EpiInvert , epiphy , epiR , epitab , epoxy , era , ergm.multi , errors , ErrorTracer , escape , estar , EstemPMM , ethiodate , EuPathDB , europop , EventPointer , evolqg , exactextractr , ExactVaRTest , ExclusionTable , eyelinker , EZtune , facebookadsR , facebookleadsR , facebookorganicR , factiv , fairmetrics , fastDummies , fastei , fastfocal , FastKRR , fastRanges , fauxnaif , fdrci , fetchGoogleAnalyticsR , fetchSalesforceR , fetwfe , FFdownload , filesstrings , filters , finalsize , fireproof , fishdata , fivethirtyeight , fjoin , flightsbr , flipr , flowGraph , FlyingR , fma , fmrihrf , fmtr , foghorn , fontawesome , forcats , ForCausality , forcis , FORD , forestly , forestplot , formatters , forwards , fourDNData , fourierin , fozziejoin , fqadata , fractional , FrailtyCompRisk , frailtyEM , framework , fredr , fritools , fritools2 , FSA , FSAdata , FSelectorRcpp , fueleconomy , furrr , fuzzystring , fwtraits , fxl , gadget3 , gapminder , gateR , GauPro , geex , gemma.R , GenderInfer , GeneralizedWendland , GENESIS , GenomeAdmixR , genproc , GeoDiff , GEOmetadb , geomorph , georefdatar , gerbil , getDTeval , geysertimes , ggbiplot , ggblanket , ggchord , ggdist , ggDoubleHeat , ggenealogy , ggforestplotR , ggformula , ggfoundry , ggimg , ggmapinset , GGMncv , ggpackets , ggpattern , ggplot2 , ggplot2.utils , ggpointdensity , ggprism , ggrepel , ggridges , ggscribe , ggside , ggspatial , ggswissmaps , ggtext , ggthemes , ggtrace , ggwidth , ggwordcloud , ghcm , ghibli , gips , giscoR , GLMcat , glmGamPoi , GLMMcosinor , glmmTMB , glue , gluedown , gMCPLite , Gmisc , googleadsR , googledrive , gooseR , gpkg , grainscape , graphicalExtremes , graphicalMCP , growthcurver , growthrates , gscounts , gsDesignNB , GSODR , gtDesign , gtfs2gps , gtfsrouter , gto , Guerry , gustave , gwascat , h3jsr , hagis , hal9001 , hchinamap , hdbayes , hdcate , hdme , HDNRA , healthatlas , healthmotionR , heatwaveR , heddlr , heplots , heritable , hermiter , heterocop , hettx , hetu , hierNest , highlightHTML , hilbertSimilarity , hipread , HistData , HistoImagePlot , hkdatasets , hmsidwR , homomorpheR , Horsekicks , hpar , hrbrthemes , htaBIM , htmlTable , htmxr , httkexamples , hubUtils , humidity , hutils , huxtable , hydrostats , hystReet , ialiquor , Ibex , icdpicr , IDEAFilter , igblastr , igoR , iGraphMatch , IHW , imagefluency , imager , immApex , incase , incubate , IndexNumberTools , infectiousR , inops , instagramadsR , intendo , interactionRCS , ipaddress , ipeaplot , islandcodes , ISLET , isocalcR , isocat , isocountry , ivs , JacobiEigen , jagstargets , janeaustenr , jlmerclusterperm , jmSurface , joineRML , joinspy , joyn , jSDM , junctions , kanjistat , kappaGold , kardl , kidsides , kitagawa , klassR , kpiwidget , labelr , landscapemetrics , latex2exp , latrend , lay , ldmppr , leafdown , leaflet.minicharts , lemna , lemon , lemur , letsR , LexisNexisTools , lightsf , linelist , linkedInadsR , lionfish , listcompr , LocalCop , localIV , logitr , lognorm , logr , longmixr , loon.ggplot , loon.shiny , lorbridge , lrstat , LSMRealOptions , lucid , luz , maaslin3 , madness , maicplus , mailchimpR , makeit , mallet , mammalcol , mapchina , mapsapi , mapscanner , mapSpain , mapycusmaximus , marginaleffects , mark , mars , maskr , MASSExtra , MAST , maxbootR , MCbiclust , mcgf , MedDataSets , medicalcoder , medicare , MedLEA , megatrees , melt , metabinR , metaboliteIDmapping , metabom8 , MetaCyto , metalite , metalite.ae , metalite.sl , metaLong , metasurvey , metrosp , mFD , mfdb , mfGARCH , miaSim , miceFast , MicrobiomeBenchmarkData , MicSim , minidown , misha , missForestPredict , mitey , mixdir , MixMatrix , mlbplotR , mlmodels , mlmoderator , mlr3db , mmequiv , mmrm , mnirs , ModCon , MODISTools , ModStatR , momentuHMM , mopac , morphemepiece , morrowplots , mortAAR , mosaicData , motif , mousetRajectory , mpoly , mrddGlobal , MRTAnalysis , msdrought , MsQuality , MSstatsLOBD , MSUthemes , mtsta , muleaData , muscData , mutSignatures , mvfmr , mvGPS , mvinfluence , mvrsquared , mvtweedie , nanoarrow , navigatr , nberwp , nblR , neonstore , NeStage , nett , nettskjemar , NetworkInference , networktools , NeuralEstimators , neurobase , NeuroDataSets , neurohcp , newsanchor , ngme2 , NHSRdatasets , nlmixr2est , nlmixr2lib , nlmixr2plot , NlsyLinks , nnTensor , noctua , nodeSub , nofrills , NonlinearDiD , nonmem2rx , nosoi , nphRCT , npsm , npsurvSS , nRegression , NRMSampling , nseq , nswgeo , nullranges , nycflights13 , o2ools , oblicubes , ohsome , omicsGMF , OmicsQC , OmopStudyBuilder , onbabynames , OncoDataSets , oolong , Open.Visualization.Academy , openalexR , opendataformat , opendatatoronto , openEBGM , openintro , OpenSpecy , OptimalBinningWoE , ordered , org.Hbacteriophora.eg.db , origin , osfr , outcomerate , ozbabynames , pagoda2 , pairkat , paleopop , palettephines , palettes , palmerpenguins , panstarrs , papaja , paramtest , PartialNetwork , parttime , partycoloR , patentsview , pct , pder , pdp , pedalfast.data , pell , PenguinR , perccalc , personalr , pharmaRTF , phenolocrop , PHENTHAUproc , philr , phinterval , PhIPData , phonfieldwork , phylotypr , picR , piglet , pillar , pinterestadsR , pipetime , pipr , PIUMA , pixarfilms , pixiedust , platowork , plotbb , plotmm , plotscaper , PNADCperiods , poem , polite , pomp , pool , PooledCohort , poputils , PosiR , PostcodesioR , posterior , PosteriorBootstrap , pQTLdata , predictsr , prenoms , prepost , presize , primarycensored , proDA , profoc , projmgr , pRoloc , propensity , PROsetta , proustr , prqlr , pTITAN2 , ptvapi , public.ctn0094data , PubMatrixR , PulmoDataSets , puremoe , purgeR , purrr , pwlmm , pysd2r , qatarcars , QFeatures , qgisprocess , qicharts2 , qs2 , quadcleanR , qualvar , QuantileNPCI , quantiseqr , quantities , quartabs , quartify , quarto , querychat , questionr , quickcheck , quoradsR , quRan , qwraps2 , R2D2ordinal , r2glmm , r2rtf , r3PG , r4ds.tutorials , r5r , raceland , radEmu , RaJIVE , RaMS , randomizr , Randomuseragent , rangeModelMetadata , rank , raptr , raretrans , RAthena , raw , rayrender , rbcb , rbmi , rbrsa , rCISSVAE , RCLabels , RcppJagger , rcrimeanalysis , RCzechia , RDesk , RDML , RDSsamplesize , rdstagger , Rduinoiot , reactable , reactRouter , receptiviti , recexcavAAR , Recon , redditadsR , Rediscover , refinr , regioncode , remap , remotePARTS , report , reporter , rerddapUtils , reservr , resourcer , rex , rfacts , rFAMS , RforProteomics , rGhanaCensus , Rglottography , rgph , rhdf5 , riem , rinat , rioplot , riskclustr , riskmetric , rivr , rixpress , Rlgt , rLifting , rlistings , rmcorr , rmdfiltr , rmdpartials , rmoo , rmsMD , rnaturalearth , RnBeads , rnnmf , robber , robotstxt , robservable , robustlmm , robustmatrix , RobustMediate , rODE , ROpenFIGI , rosario , rotasym , rpanel , rpmodel , RQEntangle , rqti , Rraven , rredlist , RRPP , Rsagacmd , rsimsum , rslp , rsparkling , rSPDE , RSQL , rstac , rtables , rtables.officer , rtdists , rtestim , rtiddlywiki , rTPC , RTSA , rTwig , rvec , rxode2 , safeframe , sageR , salem , sampledatasets , samplex , samplr , sbim , scDblFinder , scDiagnostics , scf , schrute , scico , scpdata , SCpubr , scReClassify , scriptuRs , sdmTMB , searchAnalyzeR , segmentr , segmetric , segregation , SEI , selectKSigs , seqhandbook , Seqtometry , sequenceR , seqwrap , sewage , sf , sfdep , sftime , sgdGMF , sGMRFmix , sgplot , shar , shiny.fluent , shiny.semantic , shinyAce , shinyaframe , shinyfa , shinymeta , shinyMobile , shinyscholar , shopifyadsR , shoppingwords , signs , simdata , simhelpers , simputation , simRestore , simstandard , simstudy , simtrial , simulist , SIPDIBGE , sitrep , sjlabelled , skylight , SLGP , slider , slopes , slxr , SmartMeterAnalytics , SmCCNet , smd , smriti , smvr , snapchatadsR , SomaScan.db , SOMNiBUS , spacyr , sparkbq , sparkxgb , sparrow , sparsegl , sparseMVN , SparseVFC , spatialEco , SpatialEpi , SpatialFeatureExperiment , SpatialInference , SpatPCA , spectacles , SPIChanges , spinifex , SPLICE , splots , spork , sport , spotr , spRingsteen , spStack , spsur , spup , sqlhelper , ssdtools , ssMRCD , sss , stars , starsTileServer , starwarsdb , StateLevelForest , statquotes , stepcount , stfit , stream , StreamCatTools , stringr , stxplore , SUMMER , superb , supernova , superspreading , survextrap , surveyCV , svrep , svytest , svyweight , swfdr , synr , systemPipeR , systemPipeRdata , table.glue , taboolaR , tabstats , tabtibble , TAD , tangram , targets , tauturri , TBSignatureProfiler , TCGAretriever , TCGAutils , Tcomp , tcplfit2 , terminaldigits , tern.gee , texmex , textAnnotatoR , textmineR , textpress , tf , tfaddons , tfdatasets , tflmetaR , TH.data , TheOpenAIR , thisplot , tibble , tictactoe , tidycharts , tidydann , tidydatatutor , tidyfast , tidyfst , tidyft , tidyomics , tidyrules , tidyselect , tidySEM , tidystringdist , tidytuesdayR , tidyvpc , tidyxl , tiktokadsR , tilegramsR , tilemaps , timevarcorr , tinylabels , tinyshinyserver , tipitaka , tipitaka.critical , tipr , tipsae , titanic , tmod , topconfects , toro , tr.iatgen , trace , trainsplit , traipse , traits , TrajectoryGeometry , transformerForecasting , transplantr , transx , TreeAndLeaf , treestats , TREG , trendeval , trending , trendseries , tricolore , trtswitch , truelies , TruncatedPCQM , tsbox , tsDyn , tsfeatures , twitteradsR , twoCoprimary , typstable , UBayFS , ukbabynames , ukpolice , umweltapir , uncoverappLib , unhcrthemes , units , univariateML , universalmotif , unmconf , unnest , unsurv , unvotes , UPDhmm , USAboundaries , usdarnass , usdata , usdatasets , usedist , usincometaxes , usmapdata , utile.tools , vaersNDvax , vaersvax , valueprhr , vangogh , VarSelLCM , vayr , vctrs , VectraPolarisData , vegawidget , vennDiagramLab , venny , verhoeff , vermeulen , vetiver , ViewR , villager , VIM , vinereg , vip , viralx , virtuoso , visachartR , VisCollin , vkR , voi , VOSONDash , vroom , vsn , WARDEN , WASP , waydown , wdpar , weatherOz , WeatherSentiment , weightedsurv , where , wid , windsoraiR , WordPools , workloopR , WorldFlora , wosr , WQM , wrGraph , wrswoR , yatah , zfit , ZIBR , zmisc , zonebuilder , ztpln
URL
https://dplyr.tidyverse.org , https://github.com/tidyverse/dplyr
Version
1.2.1
Vignettes
dplyr <-> base R ( source , R code ) Column-wise operations ( source , R code ) Introduction to dplyr ( source , R code ) Grouped data ( source , R code ) Using dplyr in packages ( source , R code ) Programming with dplyr ( source , R code ) Recoding columns and replacing values ( source , R code ) Row-wise operations ( source , R code ) Two-table verbs ( source , R code ) Window functions ( source , R code )
Windows Binaries
r-devel: dplyr_1.2.1.zip , r-release: dplyr_1.2.1.zip , r-oldrel: dplyr_1.2.1.zip
MacOS Binaries
r-release (arm64): dplyr_1.2.1.tgz , r-oldrel (arm64): dplyr_1.2.1.tgz , r-release (x86_64): dplyr_1.2.1.tgz , r-oldrel (x86_64): dplyr_1.2.1.tgz
Version
1.2.1
Published
2026-04-03
DOI
10.32614/CRAN.package.dplyr
Author
Hadley Wickham [aut, cre], Romain François [aut], Lionel Henry [aut], Kirill Müller [aut], Davis Vaughan [aut], Posit Software, PBC [cph, fnd]
Maintainer
Hadley Wickham <hadley at posit.co>
BugReports
https://github.com/tidyverse/dplyr/issues
License
MIT + file LICENSE
URL
https://dplyr.tidyverse.org , https://github.com/tidyverse/dplyr
NeedsCompilation
yes
Materials
README , NEWS
In Views
Databases , ModelDeployment
CRAN Checks
dplyr results
Reference Manual
dplyr.html , dplyr.pdf
Vignettes
dplyr <-> base R ( source , R code ) Column-wise operations ( source , R code ) Introduction to dplyr ( source , R code ) Grouped data ( source , R code ) Using dplyr in packages ( source , R code ) Programming with dplyr ( source , R code ) Recoding columns and replacing values ( source , R code ) Row-wise operations ( source , R code ) Two-table verbs ( source , R code ) Window functions ( source , R code )
Package Source
dplyr_1.2.1.tar.gz
Windows Binaries
r-devel: dplyr_1.2.1.zip , r-release: dplyr_1.2.1.zip , r-oldrel: dplyr_1.2.1.zip
MacOS Binaries
r-release (arm64): dplyr_1.2.1.tgz , r-oldrel (arm64): dplyr_1.2.1.tgz , r-release (x86_64): dplyr_1.2.1.tgz , r-oldrel (x86_64): dplyr_1.2.1.tgz
Old Sources
dplyr archive
Reverse Depends
actLifer , AlphaMissenseR , AMARETTO , Andromeda , AnVIL , AQuadtree , autoCovariateSelection , autoGO , babyTimeR , BatchGetSymbols , bbnet , BiocSet , broadSeq , btb , BTYD , bulletcp , bunching , cchsflow , cellxgenedp , ceRNAnetsim , cft , chunked , ClassificationEnsembles , compindexR , ConconiAnaerobicThresholdTest , CONCUR , contTimeCausal , countmaskr , cspp , cvcqv , dartR , dartR.base , depmap , DEqMS , DFplyr , diffEnrich , duckplyr , dvmisc , echoice2 , egor , EHRtemporalVariability , EpiCurve , EpiStats , estimraw , etl , evalHTE , evalITR , eyetrackingR , flatr , ForecastingEnsembles , FormulR , funMoDisco , gen5helper , geotoolsR , GerminaR , geslaR , ggmcmc , ggraptR , ggsurvey , goat , goatea , grasp2db , Greymodels , Guitar , HEDA , HiCcompare , huito , IBRtools , immundata , implyr , integr , inti , IPDfromKM , itraxR , LogisticEnsembles , longitudinalANAL , MacBehaviour , malan , manydata , matchMulti , metevalue , mevr , micropan , microseq , micss , miLAG , mixopt , monobin , normfluodbf , NTLKwIEx , NumericEnsembles , octad , omada , onmaRg , optimalFlow , OSFD , PAMpal , pfamAnalyzeR , phenModel , photosynthesisLRC , pii , plyranges , PogromcyDanych , PolicyPortfolios , prodest , promotionImpact , protGear , psychometric , PupillometryR , PupilPre , QuantPsyc , QuaternaryProd , quickpsy , QurvE , radiant.data , RAIDS , rangecondprob , RCPA , recipes , recurrentpseudo , ReDaMoR , RegEnrich , repello , RFLOMICS , rise , RiskScorescvd , rmdHelpers , rollup , rQSAR , Rtpca , saccadr , samplesize4surveys , SCdeconR , SEERaBomb , sfc , shinyML , SimDissolution , simITS , spect , StatMatch , sugarbag , survHE , tab , tangram.pipe , TeachHist , TeachingSampling , textanalyzer , thestats , tidypopgen , TKCat , TLCAR , toolmaRk , TPP , TPP2D , VectorCodeR , vectorsurvR , visae , VWPre , wINEQ
Reverse Imports
AATtools , ABCDscores , abjutils , AbSolution , academictwitteR , accelEE , AccelStab , accept , accrualPlot , accucor , ACDm , Achilles , acledR , acroname , ActCR , ActFrag , ActiSleep , activAnalyzer , activatr , activPAL , actogrammr , actuary , actuaryr , actxps , adabag , ADAM , ADAMgui , adaptalint , adas.utils , adcontabil , addinsJoaoMelo , addinsOutline , additive , adductomicsR , adegenet , adepro , adept , adheRenceRX , adjustedcranlogs , adjustedCurves , admiral , admiraldev , admiralmetabolic , admiralneuro , admiralonco , admiralophtha , admiralpeds , admiralvaccine , admixr , adobeanalyticsr , adventr , aeddo , aedseo , AEenrich , aelab , Aerith , AeRobiology , AeroSampleR , afcharts , afcolours , afdx , afmToolkit , aftables , agcounts , AgeBandDecomposition , AgePopDenom , AgeTopicModels , aggreCAT , agregR , agricolaeplotr , AgriDiversiX , agriutilities , agrobox , AgroReg , agrostab , ags , agua , agvgd , AHPGaussian , AHPWR , AIBias , aihuman , aire.zmvm , AirExposure , airGRiwrm , AirMonitor , airpart , airportr , airship , airt , AIscreenR , akc , akiFlagger , alakazam , alarmdata , aLBI , ale , alevinQC , alfred , AlgeriAPIs , alien , AlignLV , allestimates , allMT , allofus , ALLSPICER , alookr , AlphaBeta , alphabetr , AlphaPart , alphavantagepf , alphavantager , AlpsNMR , altfuelr , amadeus , amapGeocode , AMAPVox , ambiR , AmesHousing , aMNLFA , amp , amp.dm , amt , anabel , Analitica , analyzer , AnanseSeurat , aNCA , andorR , anglemania , AnglerCreelSurveySimulation , animalcules , AnimalSequences , animbook , anipaths , aniSNA , annotater , AnnotationHub , annotatr , anomalize , anomaly , ANOVAIREVA , ANOVAShiny , ANOVAShiny2 , AntClassify , AnthropMMD , AntibodyForests , AntsNet , AnVILBase , AnVILBilling , AnVILGCP , AnVILWorkflow , anyflights , aoristic , AOUSDOHtools , AovBay , apa , apa7 , APackOfTheClones , APAlyzer , apaTables , apaText , APCalign , APCI , APCinteraction , APCtools , APIS , aplotExtra , apmx , applicable , appRi
Reverse Suggests
abstr , accessr , actfts , actuaRE , adformR , adoptr , AeroEvapR , aesopR , afex , ageutils , aggregateBioVar , agpower , agridat , AHPathbankDbs , AHPtools , AHWikipathwaysDbs , AiES , aimsir17 , aisdk , AlleleShift , alluvial , alone , altair , alternativeSplicingEvents.hg19 , alternativeSplicingEvents.hg38 , amazonadsR , amazons3R , amazonspR , ameras , amp.sim , AMR , anansi , ANCOMBC , ankiR , AnVILAz , aopdata , apache.sedona , appeears , appleadsR , appsflyeR , arcgisgeocode , arcgislayers , archivist , arctools , ards , arenar , aridagri , arkdb , ARPobservation , arrow , arthistory , assemblykor , AssociationExplorer2 , asteRisk , ASURAT , asymptor , atime , atpolR , atrrr , autothresholdr , auxvecLASSO , avilistr , avocado , awinR , AzureCosmosR , azuremlsdk , babelmixr2 , babynamesIL , bage , bagyo , bangladesh , bannerCommenter , BAS , baselinenowcast , BayesianDEB , BayesianQDM , bayesiansurpriser , bbknnR , bbssr , beer , BEMPdata , bench , BerkeleyForestsAnalytics , betaARMA , bfboin , bfsl , bggum , BGmisc , bidask , BiDimRegression , bigPLSR , bigrquery , bigsnpr , bigstatsr , billboard , binford , bingadsR , BiodiversityR , BIOMASS , bioregion , biostat3 , BioWorldR , BiplotML , blends , blosc , blvim , bmlm , bmm , bodenmiller , boinet , bootmlm , box.linters , bpbounds , bpcp , brand.yml , breakaway , brunnermunzel , bscui , BSDA , butcher , CAESAR.Suite , CAISEr , camcorder , campaignmanageR , canvasXpress , canvasXpress.data , carat , CardioDataSets , caRecall , caret , cartographer , cartographr , casebase , cat2cat , catfun , catregs , causaldrf , causalnet , CausalSpline , cbsodataR , cellmigRation , CellNOptR , censo2017 , Certara.RDarwin , cfr , cgmguru , chainbinomial , checkthat , cheem , cheetahR , ChillModels , ChineseNames , clayringsmiletus , cld , ClickHouseHTTP , climate , clinTrialData , clmplus , CluMSID , ClusterBootstrap , clustSIGNAL , clustTMB , cna , codemetar , codingMatrices , codyn , cograph , collapse , collapsibleTree
Reverse Enhances
quanteda
Page sections 4
Documentation
Heading
Documentation
Links
[{"label":"dplyr.html","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/refman/dplyr.html"},{"label":"dplyr.pdf","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/dplyr.pdf"},{"label":"dplyr \u003c-\u003e base R","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/base.html"},{"label":"source","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/base.Rmd"},{"label":"R code","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/base.R"},{"label":"Column-wise operations","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/colwise.html"},{"label":"source","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/colwise.Rmd"},{"label":"R code","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/colwise.R"},{"label":"Introduction to dplyr","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/dplyr.html"},{"label":"source","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/dplyr.Rmd"},{"label":"R code","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/dplyr.R"},{"label":"Grouped data","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/grouping.html"},{"label":"source","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/grouping.Rmd"},{"label":"R code","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/grouping.R"},{"label":"Using dplyr in packages","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/in-packages.html"},{"label":"source","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/in-packages.Rmd"},{"label":"R code","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/in-packages.R"},{"label":"Programming with dplyr","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/programming.html"},{"label":"source","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/programming.Rmd"},{"label":"R code","section":"","type":"","url":"https://cran.r-project.org/web/packages/dplyr/vignettes/programming.R"}]
Text
Reference manual: dplyr.html , dplyr.pdf Vignettes: dplyr <-> base R ( source , R code ) Column-wise operations ( source , R code ) Introduction to dplyr ( source , R code ) Grouped data ( source , R code ) Using dplyr in packages ( source , R code ) Programming with dplyr ( source , R code ) Recoding columns and replacing values ( source , R code ) Row-wise operations ( source , R code ) Two-table verbs ( source , R code ) Window functions ( source , R code )
Downloads
Heading
Downloads
Links
[{"label":"dplyr_1.2.1.tar.gz","section":"","type":"","url":"https://cran.r-project.org/src/contrib/dplyr_1.2.1.tar.gz"},{"label":"dplyr_1.2.1.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.7/dplyr_1.2.1.zip"},{"label":"dplyr_1.2.1.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.6/dplyr_1.2.1.zip"},{"label":"dplyr_1.2.1.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.5/dplyr_1.2.1.zip"},{"label":"dplyr_1.2.1.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/sonoma-arm64/contrib/4.6/dplyr_1.2.1.tgz"},{"label":"dplyr_1.2.1.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-arm64/contrib/4.5/dplyr_1.2.1.tgz"},{"label":"dplyr_1.2.1.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-x86_64/contrib/4.6/dplyr_1.2.1.tgz"},{"label":"dplyr_1.2.1.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-x86_64/contrib/4.5/dplyr_1.2.1.tgz"},{"label":"dplyr archive","section":"","type":"","url":"https://CRAN.R-project.org/src/contrib/Archive/dplyr"}]
Text
Package source: dplyr_1.2.1.tar.gz Windows binaries: r-devel: dplyr_1.2.1.zip , r-release: dplyr_1.2.1.zip , r-oldrel: dplyr_1.2.1.zip macOS binaries: r-release (arm64): dplyr_1.2.1.tgz , r-oldrel (arm64): dplyr_1.2.1.tgz , r-release (x86_64): dplyr_1.2.1.tgz , r-oldrel (x86_64): dplyr_1.2.1.tgz Old sources: dplyr archive
Reverse dependencies
Heading
Reverse dependencies
Links
[{"label":"actLifer","section":"","type":"","url":"https://cran.r-project.org/web/packages/actLifer/index.html"},{"label":"AlphaMissenseR","section":"","type":"","url":"https://www.bioconductor.org/packages/release/bioc/html/AlphaMissenseR.html"},{"label":"AMARETTO","section":"","type":"","url":"https://www.bioconductor.org/packages/release/bioc/html/AMARETTO.html"},{"label":"Andromeda","section":"","type":"","url":"https://cran.r-project.org/web/packages/Andromeda/index.html"},{"label":"AnVIL","section":"","type":"","url":"https://www.bioconductor.org/packages/release/bioc/html/AnVIL.html"},{"label":"AQuadtree","section":"","type":"","url":"https://cran.r-project.org/web/packages/AQuadtree/index.html"},{"label":"autoCovariateSelection","section":"","type":"","url":"https://cran.r-project.org/web/packages/autoCovariateSelection/index.html"},{"label":"autoGO","section":"","type":"","url":"https://cran.r-project.org/web/packages/autoGO/index.html"},{"label":"babyTimeR","section":"","type":"","url":"https://cran.r-project.org/web/packages/babyTimeR/index.html"},{"label":"BatchGetSymbols","section":"","type":"","url":"https://cran.r-project.org/web/packages/BatchGetSymbols/index.html"},{"label":"bbnet","section":"","type":"","url":"https://cran.r-project.org/web/packages/bbnet/index.html"},{"label":"BiocSet","section":"","type":"","url":"https://www.bioconductor.org/packages/release/bioc/html/BiocSet.html"},{"label":"broadSeq","section":"","type":"","url":"https://www.bioconductor.org/packages/release/bioc/html/broadSeq.html"},{"label":"btb","section":"","type":"","url":"https://cran.r-project.org/web/packages/btb/index.html"},{"label":"BTYD","section":"","type":"","url":"https://cran.r-project.org/web/packages/BTYD/index.html"},{"label":"bulletcp","section":"","type":"","url":"https://cran.r-project.org/web/packages/bulletcp/index.html"},{"label":"bunching","section":"","type":"","url":"https://cran.r-project.org/web/packages/bunching/index.html"},{"label":"cchsflow","section":"","type":"","url":"https://cran.r-project.org/web/packages/cchsflow/index.html"},{"label":"cellxgenedp","section":"","type":"","url":"https://www.bioconductor.org/packages/release/bioc/html/cellxgenedp.html"},{"label":"ceRNAnetsim","section":"","type":"","url":"https://www.bioconductor.org/packages/release/bioc/html/ceRNAnetsim.html"}]
Text
Reverse depends: actLifer , AlphaMissenseR , AMARETTO , Andromeda , AnVIL , AQuadtree , autoCovariateSelection , autoGO , babyTimeR , BatchGetSymbols , bbnet , BiocSet , broadSeq , btb , BTYD , bulletcp , bunching , cchsflow , cellxgenedp , ceRNAnetsim , cft , chunked , ClassificationEnsembles , compindexR , ConconiAnaerobicThresholdTest , CONCUR , contTimeCausal , countmaskr , cspp , cvcqv , dartR , dartR.base , depmap , DEqMS , DFplyr , diffEnrich , duckplyr , dvmisc , echoice2 , egor , EHRtemporalVariability , EpiCurve , EpiStats , estimraw , etl , evalHTE , evalITR , eyetrackingR , flatr , ForecastingEnsembles , FormulR , funMoDisco , gen5helper , geotoolsR , GerminaR , geslaR , ggmcmc , ggraptR , ggsurvey , goat , goatea , grasp2db , Greymodels , Guitar , HEDA , HiCcompare , huito , IBRtools , immundata , implyr , integr , inti , IPDfromKM , itraxR , LogisticEnsembles , longitudinalANAL , MacBehaviour , malan , manydata , matchMulti , metevalue , mevr , micropan , microseq , micss , miLAG , mixopt , monobin , normfluodbf , NTLKwIEx , NumericEnsembles , octad , omada , onmaRg , optimalFlow , OSFD , PAMpal , pfamAnalyzeR , phenModel , photosynthesisLRC , pii , plyranges , PogromcyDanych , PolicyPortfolios , prodest , promotionImpact , protGear , psychometric , PupillometryR , PupilPre , QuantPsyc , QuaternaryProd , quickpsy , QurvE , radiant.data , RAIDS , rangecondprob , RCPA , recipes , recurrentpseudo , ReDaMoR , RegEnrich , repello , RFLOMICS , rise , RiskScorescvd , rmdHelpers , rollup , rQSAR , Rtpca , saccadr , samplesize4surveys , SCdeconR , SEERaBomb , sfc , shinyML , SimDissolution , simITS , spect , StatMatch , sugarbag , survHE , tab , tangram.pipe , TeachHist , TeachingSampling , textanalyzer , thestats , tidypopgen , TKCat , TLCAR , toolmaRk , TPP , TPP2D , VectorCodeR , vectorsurvR , visae , VWPre , wINEQ Reverse imports: AATtools , ABCDscores , abjutils , AbSolution , academictwitteR , accelEE , AccelStab , accept , accrualPlot , accucor , ACDm ,
Linking
Heading
Linking
Links
[{"label":"https://CRAN.R-project.org/package=dplyr","section":"","type":"","url":"https://CRAN.R-project.org/package=dplyr"}]
Text
Please use the canonical form https://CRAN.R-project.org/package=dplyr to link to this page.
Materials 2
Documentation 32
Vignettes 30
Downloads 9
All page links 120

패키지 문서 원문

7 artifacts
field
NEWS
CRAN · 1.2.1 · Materials · text/html · 216,351 · 2026-05-07
Title
NEWS
Label
NEWS
Text content
Text content
NEWS code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} pre > code.sourceCode { white-space: pre; position: relative; } pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } .sourceCode { overflow: visible; } code.sourceCode > span { color: inherit; text-decoration: inherit; } div.sourceCode { margin: 1em 0; } pre.sourceCode { margin: 0; } @media screen { div.sourceCode { overflow: auto; } } @media print { pre > code.sourceCode { white-space: pre-wrap; } pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } } pre.numberSource code { counter-reset: source-line 0; } pre.numberSource code > span { position: relative; left: -4em; counter-increment: source-line; } pre.numberSource code > span > a:first-child::before { content: counter(source-line); position: relative; left: -1em; text-align: right; vertical-align: baseline; border: none; display: inline-block; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; padding: 0 4px; width: 4em; color: #aaaaaa; } pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } div.sourceCode { } @media screen { pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } } code span.al { color: #ff0000; font-weight: bold; } /* Alert */ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ code span.bu { color: #008000; } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ code span.co { color: #60a0b0; font-style: italic; } /* Comment */ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ code span.do { color: #ba2121; font-style: italic; } /* Documentation */ code span.dt { color: #902000; } /* DataType */ code span.dv { color: #40a070; } /* DecVal */ code span.er { color: #ff0000; font-weight: bold; } /* Error */ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ code span.im { color: #008000; font-weight: bold; } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ code span.ot { color: #007020; } /* Other */ code span.pp { color: #bc7a00; } /* Preprocessor */ code span.sc { color: #4070a0; } /* SpecialChar */ code span.ss { color: #bb6688; } /* SpecialString */ code span.st { color: #4070a0; } /* String */ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ dplyr 1.2.1 dplyr is now fully compliant with the R C API (#7819). dplyr 1.2.0 New features New filter_out() companion to filter() . Use filter() when specifying rows to keep . Use filter_out() when specifying rows to drop . filter_out() simplifies cases where you would have previously used a filter() to drop rows. It is particularly useful when missing values are involved. For example, to drop rows where the count is zero: df |> filter (count != 0 | is.na (count)) df |> filter_out (count == 0 ) With filter() , you must provide a “negative” condition of != 0 and must explicitly guard against accidentally dropping rows with NA . With filter_out() , you directly specify rows to drop and you don’t have to guard against dropping rows with NA , which tends to result in much clearer code. This work is a result of Tidyup 8: Expanding the filter() family , with a lot of great feedback from the community (#6560, #6891). New when_any() and when_all() , which are elementwise versions of any() and all() . Alternatively, you can think of them as performing repeated | and & on any number of inputs, for example: when_any(x, y, z) is equivalent to x | y | z . when_all(x, y, z) is equivalent to x & y & z . when_any() is particularly useful within filter() and filter_out() to specify comma separated conditions combined with | rather than & , like: # With `|` countries |> filter ( (name %in% c ( "US" , "CA" ) & between (score, 200 , 300 )) | (name %in% c ( "PR" , "RU" ) & between (score, 100 , 200 )) ) # With `when_any()`, you drop the explicit `|`, the extra `()`, and your # conditions are all indented to the same level countries |> filter ( when_any ( name %in% c ( "US" , "CA" ) & between (score, 200 , 300 ), name %in% c ( "PR" , "RU" ) & between (score, 100 , 200 ) )) # To drop these rows instead, use `filter_out()` countries |> filter_out ( when_any ( name %in% c ( "US" , "CA" ) & between (score, 200 , 300 ), name %in% c ( "PR" , "RU" ) & between (score, 100 , 200 ) )) This work is a result of Tidyup 8: Expanding the filter() family . case_when() is now part of a family of 4 related functions, 3 of which are new: Use case_when() to create a new vector based on logical conditions. Use replace_when() to update an existing vector based on logical conditions. Use recode_values() to create a new vector by mapping all old values to new values. Use replace_values() to update an existing vector by mapping some old values to new values. Learn all about these in a new vignette, vignette("recoding-replacing") . replace_when() is particularly useful for conditionally mutating rows within one or more columns, and can be thought of as an enhanced version of base::replace() . recode_values() and replace_values() have the familiar case_when() -style formula interface for easy interactive use, but also have from and to arguments as a way for you to incorporate a pre-built lookup table, making them more holistic replacements for both case_match() and recode() . This work is a result of Tidyup 7: Recoding and replacing values in the tidyverse , with a lot of great feedback from the community (#7728, #7729). case_when() has gained a new .unmatched argument. For extra safety, set .unmatched = "error" rather than providing a .default when you believe that you’ve handled every possible case, and it will error if a case is left unhandled. The new recode_values() also has this argument (#7653). if_else() , case_when() , and coalesce() have gotten significantly faster and use much less memory due to a rewrite in C via vctrs (#7723, #7725, #7727). New ptype argument for between() , allowing users to specify the desired output type. This is particularly useful for ordered factors and other complex types where the default common type behavior might not be ideal (#6906, @JamesHWade ). New rbind() method for rowwise_df to avoid creating corrupt rowwise data frames (r-lib/vctrs#1935). Lifecycle changes Newly stable .by has moved from experimental to stable (#7762). reframe() has moved from experimental to stable (#7713, @VisruthSK ). Newly breaking if_else() no longer allows condition to be a logical array. It must be a logical vector with no dim attribute (#7723). Newly deprecated case_match() is soft-deprecated, and is fully replaced by recode_values() and replace_values() , which are more flexible, more powerful, and have much better names. In case_when() , supplying all size 1 LHS inputs along with a size >1 RHS input is now soft-deprecated. This is an improper usage of case_when() that should instead be a series of if statements, like: # Scalars! code <- 1L flavor <- "vanilla" # Improper usage: case_when ( code == 1L && flavor == "chocolate" ~ x, code == 1L && flavor == "vanilla" ~
field
README
CRAN · 1.2.1 · Materials · text/html · 20,817 · 2026-05-07
Title
README
Label
README
Text content
Text content
README code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} pre > code.sourceCode { white-space: pre; position: relative; } pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } .sourceCode { overflow: visible; } code.sourceCode > span { color: inherit; text-decoration: inherit; } div.sourceCode { margin: 1em 0; } pre.sourceCode { margin: 0; } @media screen { div.sourceCode { overflow: auto; } } @media print { pre > code.sourceCode { white-space: pre-wrap; } pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } } pre.numberSource code { counter-reset: source-line 0; } pre.numberSource code > span { position: relative; left: -4em; counter-increment: source-line; } pre.numberSource code > span > a:first-child::before { content: counter(source-line); position: relative; left: -1em; text-align: right; vertical-align: baseline; border: none; display: inline-block; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; padding: 0 4px; width: 4em; color: #aaaaaa; } pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } div.sourceCode { } @media screen { pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } } code span.al { color: #ff0000; font-weight: bold; } /* Alert */ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ code span.bu { color: #008000; } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ code span.co { color: #60a0b0; font-style: italic; } /* Comment */ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ code span.do { color: #ba2121; font-style: italic; } /* Documentation */ code span.dt { color: #902000; } /* DataType */ code span.dv { color: #40a070; } /* DecVal */ code span.er { color: #ff0000; font-weight: bold; } /* Error */ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ code span.im { color: #008000; font-weight: bold; } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ code span.ot { color: #007020; } /* Other */ code span.pp { color: #bc7a00; } /* Preprocessor */ code span.sc { color: #4070a0; } /* SpecialChar */ code span.ss { color: #bb6688; } /* SpecialString */ code span.st { color: #4070a0; } /* String */ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ dplyr Overview dplyr is a grammar of data manipulation, providing a consistent set of verbs that help you solve the most common data manipulation challenges: mutate() adds new variables that are functions of existing variables select() picks variables based on their names. filter() picks cases based on their values. summarise() reduces multiple values down to a single summary. arrange() changes the ordering of the rows. These all combine naturally with group_by() which allows you to perform any operation “by group”. You can learn more about them in vignette("dplyr") . As well as these single-table verbs, dplyr also provides a variety of two-table verbs, which you can learn about in vignette("two-table") . If you are new to dplyr, the best place to start is the data transformation chapter in R for Data Science. Backends In addition to data frames/tibbles, dplyr makes working with other computational backends accessible and efficient. Below is a list of alternative backends: arrow for larger-than-memory datasets, including on remote cloud storage like AWS S3, using the Apache Arrow C++ engine, Acero . dbplyr for data stored in a relational database. Translates your dplyr code to SQL. dtplyr for large, in-memory datasets. Translates your dplyr code to high performance data.table code. duckplyr for large, in-memory datasets. Translates your dplyr code to high performance duckdb queries with zero extra copies and an automatic R fallback when translation isn’t possible. sparklyr for very large datasets stored in Apache Spark . Installation # The easiest way to get dplyr is to install the whole tidyverse: install.packages ( "tidyverse" ) # Alternatively, install just dplyr: install.packages ( "dplyr" ) Development version To get a bug fix or to use a feature from the development version, you can install the development version of dplyr from GitHub. # install.packages("pak") pak :: pak ( "tidyverse/dplyr" ) Cheat Sheet Usage library (dplyr) starwars |> filter (species == "Droid" ) #> # A tibble: 6 × 14 #> name height mass hair_color skin_color eye_color birth_year sex gender #> <chr> <int> <dbl> <chr> <chr> <chr> <dbl> <chr> <chr> #> 1 C-3PO 167 75 <NA> gold yellow 112 none masculi… #> 2 R2-D2 96 32 <NA> white, blue red 33 none masculi… #> 3 R5-D4 97 32 <NA> white, red red NA none masculi… #> 4 IG-88 200 140 none metal red 15 none masculi… #> 5 R4-P17 96 NA none silver, red red, blue NA none feminine #> # ℹ 1 more row #> # ℹ 5 more variables: homeworld <chr>, species <chr>, films <list>, #> # vehicles <list>, starships <list> starwars |> select (name, ends_with ( "color" )) #> # A tibble: 87 × 4 #> name hair_color skin_color eye_color #> <chr> <chr> <chr> <chr> #> 1 Luke Skywalker blond fair blue #> 2 C-3PO <NA> gold yellow #> 3 R2-D2 <NA> white, blue red #> 4 Darth Vader none white yellow #> 5 Leia Organa brown light brown #> # ℹ 82 more rows starwars |> mutate (name, bmi = mass / ((height / 100 ) ^ 2 )) |> select (name : mass, bmi) #> # A tibble: 87 × 4 #> name height mass bmi #> <chr> <int> <dbl> <dbl> #> 1 Luke Skywalker 172 77 26.0 #> 2 C-3PO 167 75 26.9 #> 3 R2-D2 96 32 34.7 #> 4 Darth Vader 202 136 33.3 #> 5 Leia Organa 150 49 21.8 #> # ℹ 82 more rows starwars |> arrange ( desc (mass)) #> # A tibble: 87 × 14 #> name height mass hair_color skin_color eye_color birth_year sex gender #> <chr> <int> <dbl> <chr> <chr> <chr> <dbl> <chr> <chr> #> 1 Jabba De… 175 1358 <NA> green-tan… orange 600 herm… mascu… #> 2 Grievous 216 159 none brown, wh… green, y… NA male mascu… #> 3 IG-88 200 140 none metal red 15 none mascu… #> 4 Darth Va… 202 136 none white yellow 41.9 male mascu… #> 5 Tarfful 234 136 brown brown blue NA male mascu… #> # ℹ 82 more rows #> # ℹ 5 more variables: homeworld <chr>, species <chr>, films <list>, #> # vehicles <list>, starships <list> starwars |> group_by (species) |> summarise ( n = n (), mass = mean (mass, na.rm = TRUE ) ) |> filter ( n > 1 , mass > 50 ) #> # A tibble: 9 × 3 #> species n mass #> <chr> <int> <dbl> #> 1 Droid 6 69.8 #> 2 Gungan 3 74 #> 3 Human 35 81.3 #> 4 Kaminoan 2 88 #> 5 Mirialan 2 53.1 #> # ℹ 4 more rows Getting help If you encounter a clear bug, please file an issue with a minimal reproducible example on GitHub . For questions and other discussion, please use forum.posit.co . Code of conduct Please note that this project is released with a Contributor Code of Conduct . By participating in this project you agree to abide by its terms.
reference_manual_html
Reference manual HTML
CRAN · 1.2.1 · Documentation · text/html · 407,488 · 2026-05-07
Title
Help for package dplyr
Label
Reference manual HTML
Text content
Text content
Help for package dplyr const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"}; function processMathHTML() { var l = document.getElementsByClassName('reqn'); for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); } return; } Package {dplyr} Contents dplyr-package across all_equal all_vars args_by arrange arrange_all auto_copy backend_dbplyr band_members between bind_cols bind_rows c_across case-and-replace-when case_match check_dbplyr coalesce common_by compute consecutive_id context copy_to count cross_join cumall defunct defunct-each defunct-lazyeval deprec-context desc dim_desc distinct distinct_all distinct_prepare do dplyr-locale dplyr_by dplyr_data_masking dplyr_extending dplyr_tidy_select explain filter filter-joins filter_all funs glimpse group_by group_by_all group_by_drop_default group_cols group_data group_map group_nest group_split group_trim grouped_df ident if_else join_by last_dplyr_warnings lead-lag make_tbl mutate mutate-joins mutate_all n_distinct na_if near nest_by nest_join new_grouped_df nth ntile order_by percent_rank pick progress_estimated pull recode recode-and-replace-values reexports reframe relocate rename row_number rows rowwise same_src sample_n scoped select select_all setops slice sql src src_tbls starwars storms summarise summarise_all tbl tbl_ptype tbl_vars tidyeval-compat top_n transmute vars when-any-all with_groups with_order Type: Package Title: A Grammar of Data Manipulation Version: 1.2.1 Description: A fast, consistent tool for working with data frame like objects, both in memory and out of memory. License: MIT + file LICENSE URL: https://dplyr.tidyverse.org , https://github.com/tidyverse/dplyr BugReports: https://github.com/tidyverse/dplyr/issues Depends: R (≥ 4.1.0) Imports: cli (≥ 3.6.2), generics, glue (≥ 1.3.2), lifecycle (≥ 1.0.5), magrittr (≥ 1.5), methods, pillar (≥ 1.9.0), R6, rlang (≥ 1.1.7), tibble (≥ 3.2.0), tidyselect (≥ 1.2.0), utils, vctrs (≥ 0.7.1) Suggests: broom, covr, DBI, dbplyr (≥ 2.2.1), ggplot2, knitr, Lahman, lobstr, nycflights13, purrr, rmarkdown, RSQLite, stringi (≥ 1.7.6), testthat (≥ 3.1.5), tidyr (≥ 1.3.0), withr VignetteBuilder: knitr Config/build/compilation-database: true Config/Needs/website: tidyverse/tidytemplate Config/testthat/edition: 3 Encoding: UTF-8 LazyData: true RoxygenNote: 7.3.3 NeedsCompilation: yes Packaged: 2026-04-02 19:51:05 UTC; hadleywickham Author: Hadley Wickham [aut, cre], Romain François [aut], Lionel Henry [aut], Kirill Müller [aut], Davis Vaughan [aut], Posit Software, PBC [cph, fnd] Maintainer: Hadley Wickham <hadley@posit.co> Repository: CRAN Date/Publication: 2026-04-03 07:30:08 UTC dplyr: A Grammar of Data Manipulation Description To learn more about dplyr, start with the vignettes: browseVignettes(package = "dplyr") Author(s) Maintainer : Hadley Wickham hadley@posit.co ( ORCID ) Authors: Romain François ( ORCID ) Lionel Henry Kirill Müller ( ORCID ) Davis Vaughan davis@posit.co ( ORCID ) Other contributors: Posit Software, PBC [copyright holder, funder] See Also Useful links: https://dplyr.tidyverse.org https://github.com/tidyverse/dplyr Report bugs at https://github.com/tidyverse/dplyr/issues Apply a function (or functions) across multiple columns Description across() makes it easy to apply the same transformation to multiple columns, allowing you to use select() semantics inside in "data-masking" functions like summarise() and mutate() . See vignette("colwise") for more details. if_any() and if_all() apply the same predicate function to a selection of columns and combine the results into a single logical vector: if_any() is TRUE when the predicate is TRUE for any of the selected columns, if_all() is TRUE when the predicate is TRUE for all selected columns. If you just need to select columns without applying a transformation to each of them, then you probably want to use pick() instead. across() supersedes the family of "scoped variants" like summarise_at() , summarise_if() , and summarise_all() . Usage across(.cols, .fns, ..., .names = NULL, .unpack = FALSE) if_any(.cols, .fns, ..., .names = NULL) if_all(.cols, .fns, ..., .names = NULL) Arguments .cols < tidy-select > Columns to transform. You can't select grouping columns because they are already automatically handled by the verb (i.e. summarise() or mutate() ). .fns Functions to apply to each of the selected columns. Possible values are: A function, e.g. mean . A purrr-style lambda, e.g. ~ mean(.x, na.rm = TRUE) A named list of functions or lambdas, e.g. ⁠list(mean = mean, n_miss = ~ sum(is.na(.x))⁠ . Each function is applied to each column, and the output is named by combining the function name and the column name using the glue specification in .names . Within these functions you can use cur_column() and cur_group() to access the current column and grouping keys respectively. ... Additional arguments for the function calls in .fns are no longer accepted in ... because it's not clear when they should be evaluated: once per across() or once per group? Instead supply additional arguments directly in .fns by using a lambda. For example, instead of across(a:b, mean, na.rm = TRUE) write across(a:b, ~ mean(.x, na.rm = TRUE)) . .names A glue specification that describes how to name the output columns. This can use {.col} to stand for the selected column name, and {.fn} to stand for the name of the function being applied. The default ( NULL ) is equivalent to "{.col}" for the single function case and "{.col}_{.fn}" for the case where a list is used for .fns . .unpack Optionally unpack data frames returned by functions in .fns , which expands the df-columns out into individual columns, retaining the number of rows in the data frame. If FALSE , the default, no unpacking is done. If TRUE , unpacking is done with a default glue specification of "{outer}_{inner}" . Otherwise, a single glue specification can be supplied to describe how to name the unpacked columns. This can use {outer} to refer to the name originally generated by .names , and {inner} to refer to the names of the data frame you are unpacking. Details When there are no selected columns: if_any() will return FALSE , consistent with the behavior of any() when called without inputs. if_all() will return TRUE , consistent with the behavior of all() when called without inputs. Value across() typically returns a tibble with one column for each column in .cols and each function in .fns . If .unpack is used, more columns may be returned depending on how the results of .fns are unpacked. if_any() and if_all() return a logical vector. Timing of evaluation R code in dplyr verbs is generally evaluated once per group. Inside across() however, code is evaluated once for each combination of columns and groups. If the evaluation timing is important, for example if you're generating random variables, think about when it should happen and place your code in consequence. gdf <- tibble(g = c(1, 1, 2, 3), v1 = 10:13, v2 = 20:23) |> group_by(g) set.seed(1) # Outside: 1 normal variate n <- rnorm(1) gdf |> mutate(across(v1:v2, ~ .x + n)) #> # A tibble: 4 x 3 #> # Groups: g [3] #> g v1 v2 #> <dbl> <dbl> <dbl> #> 1 1 9.37 19.4 #> 2 1 10.4 20.4 #> 3 2 11.4 21.4 #> 4 3 12.4 22.4 # Inside a verb: 3 normal variates (ngroup) gdf |> mutate(n = rnorm(1), across(v1:v2, ~ .x + n)) #> # A tibble: 4 x 4 #> # Groups: g [3] #> g v1 v2 n #> <dbl> <dbl> <dbl> <dbl> #> 1 1 10.2 20.2 0.184 #> 2 1 11.2 21.2 0.184 #> 3 2 11.2 21.2 -0.836 #> 4 3 14.6 24.6 1.60 # Inside `across()`: 6 normal variates (ncol * ngroup) gdf |> mutate(across(v1:v2, ~ .x + rnorm(1))) #> # A tibble: 4 x 3 #> # Groups: g [3] #> g v1 v2 #> <dbl> <dbl> <dbl> #> 1 1 10.3 20.7 #> 2 1 11.3 21.7 #> 3 2 11.2 22.6 #> 4 3 13.5 22.7 See Also c_across() for a function that returns a vector Examples # For better printing iris <- as_tibble(iris) # across() ----------------------------------------------------------------- # Using everyth
section
dplyr.pdf
CRAN · 1.2.1 · Documentation · application/pdf · 394,343 · 2026-05-07
Title
dplyr.pdf
Label
dplyr.pdf
field
Apply a function (or functions) across multiple columns
R-universe · 1.2.1.9000 · Apply a function (or functions) across multiple columns · text/html; charset=utf-8 · 673,039 · 2026-05-07
Title
Package 'dplyr' reference manual
Label
Apply a function (or functions) across multiple columns
Text content
Text content
Package 'dplyr' reference manual Package 'dplyr' Title: A Grammar of Data Manipulation Description: A fast, consistent tool for working with data frame like objects, both in memory and out of memory. Authors: Hadley Wickham [aut, cre] (ORCID: <https://orcid.org/0000-0003-4757-117X>), Romain François [aut] (ORCID: <https://orcid.org/0000-0002-2444-4226>), Lionel Henry [aut], Kirill Müller [aut] (ORCID: <https://orcid.org/0000-0002-1416-3412>), Davis Vaughan [aut] (ORCID: <https://orcid.org/0000-0003-4777-038X>), Posit Software, PBC [cph, fnd] Maintainer: Hadley Wickham < [email protected] > License: MIT + file LICENSE Version: 1.2.1.9000 Built: 2026-05-06 17:33:23 UTC Source: https://github.com/tidyverse/dplyr Help Index Apply a function (or functions) across multiple columns Apply predicate to all variables Order rows using column values Copy tables to same source, if necessary Band membership Detect where values fall in a specified range Bind multiple data frames by column Bind multiple data frames by row Combine values from multiple columns A general vectorised if-else Find the first non-missing element Force computation of a database query Generate a unique identifier for consecutive combinations Information about the "current" group or variable Copy a local data frame to a remote src Count the observations in each group Cross join Cumulative versions of any, all, and mean Descending order Keep distinct/unique rows Per-operation grouping with .by/by Explain details of a tbl Keep or drop rows that match a condition Filtering joins Get a glimpse of your data Group by one or more variables Select grouping variables Apply a function to each group Trim grouping structure Flag a character vector as SQL identifiers Vectorised if-else Join specifications Compute lagged or leading values Create, modify, and delete columns Mutating joins Count unique combinations Convert values to NA Compare two numeric vectors Nest join Extract the first, last, or nth value from a vector Bucket a numeric vector into n groups A helper function for ordering window function output Proportional ranking functions Select a subset of columns Extract a single column Recode values Recode and replace values Transform each group to an arbitrary number of rows Change column order Rename columns Integer ranking functions Manipulate individual rows Group input by rows Operate on a selection of variables Keep or drop columns using their names and types Set operations Subset rows using their positions SQL escaping. Starwars characters Storm tracks data Summarise each group down to one row Create a table from a data source Select variables Elementwise any() and all() Apply a function (or functions) across multiple columns Description across() makes it easy to apply the same transformation to multiple columns, allowing you to use select() semantics inside in "data-masking" functions like summarise() and mutate() . See vignette("colwise") for more details. if_any() and if_all() apply the same predicate function to a selection of columns and combine the results into a single logical vector: if_any() is TRUE when the predicate is TRUE for any of the selected columns, if_all() is TRUE when the predicate is TRUE for all selected columns. If you just need to select columns without applying a transformation to each of them, then you probably want to use pick() instead. across() supersedes the family of "scoped variants" like summarise_at() , summarise_if() , and summarise_all() . Usage across(.cols, .fns, ..., .names = NULL, .unpack = FALSE) if_any(.cols, .fns, ..., .names = NULL) if_all(.cols, .fns, ..., .names = NULL) across ( .cols , .fns , ... , .names = NULL , .unpack = FALSE ) if_any ( .cols , .fns , ... , .names = NULL ) if_all ( .cols , .fns , ... , .names = NULL ) Arguments .cols < tidy-select > Columns to transform. You can't select grouping columns because they are already automatically handled by the verb (i.e. summarise() or mutate() ). .fns Functions to apply to each of the selected columns. Possible values are: A function, e.g. mean . A purrr-style lambda, e.g. ~ mean(.x, na.rm = TRUE) A named list of functions or lambdas, e.g. ⁠list(mean = mean, n_miss = ~ sum(is.na(.x))⁠ . Each function is applied to each column, and the output is named by combining the function name and the column name using the glue specification in .names . Within these functions you can use cur_column() and cur_group() to access the current column and grouping keys respectively. ... Additional arguments for the function calls in .fns are no longer accepted in ... because it's not clear when they should be evaluated: once per across() or once per group? Instead supply additional arguments directly in .fns by using a lambda. For example, instead of across(a:b, mean, na.rm = TRUE) write across(a:b, ~ mean(.x, na.rm = TRUE)) . .names A glue specification that describes how to name the output columns. This can use {.col} to stand for the selected column name, and {.fn} to stand for the name of the function being applied. The default ( NULL ) is equivalent to "{.col}" for the single function case and "{.col}_{.fn}" for the case where a list is used for .fns . .unpack Optionally unpack data frames returned by functions in .fns , which expands the df-columns out into individual columns, retaining the number of rows in the data frame. If FALSE , the default, no unpacking is done. If TRUE , unpacking is done with a default glue specification of "{outer}_{inner}" . Otherwise, a single glue specification can be supplied to describe how to name the unpacked columns. This can use {outer} to refer to the name originally generated by .names , and {inner} to refer to the names of the data frame you are unpacking. Details When there are no selected columns: if_any() will return FALSE , consistent with the behavior of any() when called without inputs. if_all() will return TRUE , consistent with the behavior of all() when called without inputs. Value across() typically returns a tibble with one column for each column in .cols and each function in .fns . If .unpack is used, more columns may be returned depending on how the results of .fns are unpacked. if_any() and if_all() return a logical vector. Timing of evaluation R code in dplyr verbs is generally evaluated once per group. Inside across() however, code is evaluated once for each combination of columns and groups. If the evaluation timing is important, for example if you're generating random variables, think about when it should happen and place your code in consequence. gdf <- tibble(g = c(1, 1, 2, 3), v1 = 10:13, v2 = 20:23) |> group_by(g) set.seed(1) # Outside: 1 normal variate n <- rnorm(1) gdf |> mutate(across(v1:v2, ~ .x + n)) #> # A tibble: 4 x 3 #> # Groups: g [3] #> g v1 v2 #> <dbl> <dbl> <dbl> #> 1 1 9.37 19.4 #> 2 1 10.4 20.4 #> 3 2 11.4 21.4 #> 4 3 12.4 22.4 # Inside a verb: 3 normal variates (ngroup) gdf |> mutate(n = rnorm(1), across(v1:v2, ~ .x + n)) #> # A tibble: 4 x 4 #> # Groups: g [3] #> g v1 v2 n #> <dbl> <dbl> <dbl> <dbl> #> 1 1 10.2 20.2 0.184 #> 2 1 11.2 21.2 0.184 #> 3 2 11.2 21.2 -0.836 #> 4 3 14.6 24.6 1.60 # Inside `across()`: 6 normal variates (ncol * ngroup) gdf |> mutate(across(v1:v2, ~ .x + rnorm(1))) #> # A tibble: 4 x 3 #> # Groups: g [3] #> g v1 v2 #> <dbl> <dbl> <dbl> #> 1 1 10.3 20.7 #> 2 1 11.3 21.7 #> 3 2 11.2 22.6 #> 4 3 13.5 22.7 See Also c_across() for a function that returns a vector Examples # For better printing iris <- as_tibble(iris) # across() ----------------------------------------------------------------- # Using everything() to apply the same function to all columns iris |> mutate(across(everything(), as.character)) # Different ways to select the same set of columns # See <https://tidyselect.r-lib.org/articles/syntax.html> for details iris |> mutate(across(c(Sepal.Length, Sepal.Width), round)) iris |> mutate(across(c(1, 2), round)) iris |> mutate(across(1:Sepal.Width, round)) iris |> mutate(across(where(is.double) &
field
Apply predicate to all variables
R-universe · 1.2.1.9000 · Apply predicate to all variables · text/html; charset=utf-8 · 673,039 · 2026-05-07
Title
Package 'dplyr' reference manual
Label
Apply predicate to all variables
Text content
Text content
Package 'dplyr' reference manual Package 'dplyr' Title: A Grammar of Data Manipulation Description: A fast, consistent tool for working with data frame like objects, both in memory and out of memory. Authors: Hadley Wickham [aut, cre] (ORCID: <https://orcid.org/0000-0003-4757-117X>), Romain François [aut] (ORCID: <https://orcid.org/0000-0002-2444-4226>), Lionel Henry [aut], Kirill Müller [aut] (ORCID: <https://orcid.org/0000-0002-1416-3412>), Davis Vaughan [aut] (ORCID: <https://orcid.org/0000-0003-4777-038X>), Posit Software, PBC [cph, fnd] Maintainer: Hadley Wickham < [email protected] > License: MIT + file LICENSE Version: 1.2.1.9000 Built: 2026-05-06 17:33:23 UTC Source: https://github.com/tidyverse/dplyr Help Index Apply a function (or functions) across multiple columns Apply predicate to all variables Order rows using column values Copy tables to same source, if necessary Band membership Detect where values fall in a specified range Bind multiple data frames by column Bind multiple data frames by row Combine values from multiple columns A general vectorised if-else Find the first non-missing element Force computation of a database query Generate a unique identifier for consecutive combinations Information about the "current" group or variable Copy a local data frame to a remote src Count the observations in each group Cross join Cumulative versions of any, all, and mean Descending order Keep distinct/unique rows Per-operation grouping with .by/by Explain details of a tbl Keep or drop rows that match a condition Filtering joins Get a glimpse of your data Group by one or more variables Select grouping variables Apply a function to each group Trim grouping structure Flag a character vector as SQL identifiers Vectorised if-else Join specifications Compute lagged or leading values Create, modify, and delete columns Mutating joins Count unique combinations Convert values to NA Compare two numeric vectors Nest join Extract the first, last, or nth value from a vector Bucket a numeric vector into n groups A helper function for ordering window function output Proportional ranking functions Select a subset of columns Extract a single column Recode values Recode and replace values Transform each group to an arbitrary number of rows Change column order Rename columns Integer ranking functions Manipulate individual rows Group input by rows Operate on a selection of variables Keep or drop columns using their names and types Set operations Subset rows using their positions SQL escaping. Starwars characters Storm tracks data Summarise each group down to one row Create a table from a data source Select variables Elementwise any() and all() Apply a function (or functions) across multiple columns Description across() makes it easy to apply the same transformation to multiple columns, allowing you to use select() semantics inside in "data-masking" functions like summarise() and mutate() . See vignette("colwise") for more details. if_any() and if_all() apply the same predicate function to a selection of columns and combine the results into a single logical vector: if_any() is TRUE when the predicate is TRUE for any of the selected columns, if_all() is TRUE when the predicate is TRUE for all selected columns. If you just need to select columns without applying a transformation to each of them, then you probably want to use pick() instead. across() supersedes the family of "scoped variants" like summarise_at() , summarise_if() , and summarise_all() . Usage across(.cols, .fns, ..., .names = NULL, .unpack = FALSE) if_any(.cols, .fns, ..., .names = NULL) if_all(.cols, .fns, ..., .names = NULL) across ( .cols , .fns , ... , .names = NULL , .unpack = FALSE ) if_any ( .cols , .fns , ... , .names = NULL ) if_all ( .cols , .fns , ... , .names = NULL ) Arguments .cols < tidy-select > Columns to transform. You can't select grouping columns because they are already automatically handled by the verb (i.e. summarise() or mutate() ). .fns Functions to apply to each of the selected columns. Possible values are: A function, e.g. mean . A purrr-style lambda, e.g. ~ mean(.x, na.rm = TRUE) A named list of functions or lambdas, e.g. ⁠list(mean = mean, n_miss = ~ sum(is.na(.x))⁠ . Each function is applied to each column, and the output is named by combining the function name and the column name using the glue specification in .names . Within these functions you can use cur_column() and cur_group() to access the current column and grouping keys respectively. ... Additional arguments for the function calls in .fns are no longer accepted in ... because it's not clear when they should be evaluated: once per across() or once per group? Instead supply additional arguments directly in .fns by using a lambda. For example, instead of across(a:b, mean, na.rm = TRUE) write across(a:b, ~ mean(.x, na.rm = TRUE)) . .names A glue specification that describes how to name the output columns. This can use {.col} to stand for the selected column name, and {.fn} to stand for the name of the function being applied. The default ( NULL ) is equivalent to "{.col}" for the single function case and "{.col}_{.fn}" for the case where a list is used for .fns . .unpack Optionally unpack data frames returned by functions in .fns , which expands the df-columns out into individual columns, retaining the number of rows in the data frame. If FALSE , the default, no unpacking is done. If TRUE , unpacking is done with a default glue specification of "{outer}_{inner}" . Otherwise, a single glue specification can be supplied to describe how to name the unpacked columns. This can use {outer} to refer to the name originally generated by .names , and {inner} to refer to the names of the data frame you are unpacking. Details When there are no selected columns: if_any() will return FALSE , consistent with the behavior of any() when called without inputs. if_all() will return TRUE , consistent with the behavior of all() when called without inputs. Value across() typically returns a tibble with one column for each column in .cols and each function in .fns . If .unpack is used, more columns may be returned depending on how the results of .fns are unpacked. if_any() and if_all() return a logical vector. Timing of evaluation R code in dplyr verbs is generally evaluated once per group. Inside across() however, code is evaluated once for each combination of columns and groups. If the evaluation timing is important, for example if you're generating random variables, think about when it should happen and place your code in consequence. gdf <- tibble(g = c(1, 1, 2, 3), v1 = 10:13, v2 = 20:23) |> group_by(g) set.seed(1) # Outside: 1 normal variate n <- rnorm(1) gdf |> mutate(across(v1:v2, ~ .x + n)) #> # A tibble: 4 x 3 #> # Groups: g [3] #> g v1 v2 #> <dbl> <dbl> <dbl> #> 1 1 9.37 19.4 #> 2 1 10.4 20.4 #> 3 2 11.4 21.4 #> 4 3 12.4 22.4 # Inside a verb: 3 normal variates (ngroup) gdf |> mutate(n = rnorm(1), across(v1:v2, ~ .x + n)) #> # A tibble: 4 x 4 #> # Groups: g [3] #> g v1 v2 n #> <dbl> <dbl> <dbl> <dbl> #> 1 1 10.2 20.2 0.184 #> 2 1 11.2 21.2 0.184 #> 3 2 11.2 21.2 -0.836 #> 4 3 14.6 24.6 1.60 # Inside `across()`: 6 normal variates (ncol * ngroup) gdf |> mutate(across(v1:v2, ~ .x + rnorm(1))) #> # A tibble: 4 x 3 #> # Groups: g [3] #> g v1 v2 #> <dbl> <dbl> <dbl> #> 1 1 10.3 20.7 #> 2 1 11.3 21.7 #> 3 2 11.2 22.6 #> 4 3 13.5 22.7 See Also c_across() for a function that returns a vector Examples # For better printing iris <- as_tibble(iris) # across() ----------------------------------------------------------------- # Using everything() to apply the same function to all columns iris |> mutate(across(everything(), as.character)) # Different ways to select the same set of columns # See <https://tidyselect.r-lib.org/articles/syntax.html> for details iris |> mutate(across(c(Sepal.Length, Sepal.Width), round)) iris |> mutate(across(c(1, 2), round)) iris |> mutate(across(1:Sepal.Width, round)) iris |> mutate(across(where(is.double) &
field
Order rows using column values
R-universe · 1.2.1.9000 · Order rows using column values · text/html; charset=utf-8 · 673,039 · 2026-05-07
Title
Package 'dplyr' reference manual
Label
Order rows using column values
Text content
Text content
Package 'dplyr' reference manual Package 'dplyr' Title: A Grammar of Data Manipulation Description: A fast, consistent tool for working with data frame like objects, both in memory and out of memory. Authors: Hadley Wickham [aut, cre] (ORCID: <https://orcid.org/0000-0003-4757-117X>), Romain François [aut] (ORCID: <https://orcid.org/0000-0002-2444-4226>), Lionel Henry [aut], Kirill Müller [aut] (ORCID: <https://orcid.org/0000-0002-1416-3412>), Davis Vaughan [aut] (ORCID: <https://orcid.org/0000-0003-4777-038X>), Posit Software, PBC [cph, fnd] Maintainer: Hadley Wickham < [email protected] > License: MIT + file LICENSE Version: 1.2.1.9000 Built: 2026-05-06 17:33:23 UTC Source: https://github.com/tidyverse/dplyr Help Index Apply a function (or functions) across multiple columns Apply predicate to all variables Order rows using column values Copy tables to same source, if necessary Band membership Detect where values fall in a specified range Bind multiple data frames by column Bind multiple data frames by row Combine values from multiple columns A general vectorised if-else Find the first non-missing element Force computation of a database query Generate a unique identifier for consecutive combinations Information about the "current" group or variable Copy a local data frame to a remote src Count the observations in each group Cross join Cumulative versions of any, all, and mean Descending order Keep distinct/unique rows Per-operation grouping with .by/by Explain details of a tbl Keep or drop rows that match a condition Filtering joins Get a glimpse of your data Group by one or more variables Select grouping variables Apply a function to each group Trim grouping structure Flag a character vector as SQL identifiers Vectorised if-else Join specifications Compute lagged or leading values Create, modify, and delete columns Mutating joins Count unique combinations Convert values to NA Compare two numeric vectors Nest join Extract the first, last, or nth value from a vector Bucket a numeric vector into n groups A helper function for ordering window function output Proportional ranking functions Select a subset of columns Extract a single column Recode values Recode and replace values Transform each group to an arbitrary number of rows Change column order Rename columns Integer ranking functions Manipulate individual rows Group input by rows Operate on a selection of variables Keep or drop columns using their names and types Set operations Subset rows using their positions SQL escaping. Starwars characters Storm tracks data Summarise each group down to one row Create a table from a data source Select variables Elementwise any() and all() Apply a function (or functions) across multiple columns Description across() makes it easy to apply the same transformation to multiple columns, allowing you to use select() semantics inside in "data-masking" functions like summarise() and mutate() . See vignette("colwise") for more details. if_any() and if_all() apply the same predicate function to a selection of columns and combine the results into a single logical vector: if_any() is TRUE when the predicate is TRUE for any of the selected columns, if_all() is TRUE when the predicate is TRUE for all selected columns. If you just need to select columns without applying a transformation to each of them, then you probably want to use pick() instead. across() supersedes the family of "scoped variants" like summarise_at() , summarise_if() , and summarise_all() . Usage across(.cols, .fns, ..., .names = NULL, .unpack = FALSE) if_any(.cols, .fns, ..., .names = NULL) if_all(.cols, .fns, ..., .names = NULL) across ( .cols , .fns , ... , .names = NULL , .unpack = FALSE ) if_any ( .cols , .fns , ... , .names = NULL ) if_all ( .cols , .fns , ... , .names = NULL ) Arguments .cols < tidy-select > Columns to transform. You can't select grouping columns because they are already automatically handled by the verb (i.e. summarise() or mutate() ). .fns Functions to apply to each of the selected columns. Possible values are: A function, e.g. mean . A purrr-style lambda, e.g. ~ mean(.x, na.rm = TRUE) A named list of functions or lambdas, e.g. ⁠list(mean = mean, n_miss = ~ sum(is.na(.x))⁠ . Each function is applied to each column, and the output is named by combining the function name and the column name using the glue specification in .names . Within these functions you can use cur_column() and cur_group() to access the current column and grouping keys respectively. ... Additional arguments for the function calls in .fns are no longer accepted in ... because it's not clear when they should be evaluated: once per across() or once per group? Instead supply additional arguments directly in .fns by using a lambda. For example, instead of across(a:b, mean, na.rm = TRUE) write across(a:b, ~ mean(.x, na.rm = TRUE)) . .names A glue specification that describes how to name the output columns. This can use {.col} to stand for the selected column name, and {.fn} to stand for the name of the function being applied. The default ( NULL ) is equivalent to "{.col}" for the single function case and "{.col}_{.fn}" for the case where a list is used for .fns . .unpack Optionally unpack data frames returned by functions in .fns , which expands the df-columns out into individual columns, retaining the number of rows in the data frame. If FALSE , the default, no unpacking is done. If TRUE , unpacking is done with a default glue specification of "{outer}_{inner}" . Otherwise, a single glue specification can be supplied to describe how to name the unpacked columns. This can use {outer} to refer to the name originally generated by .names , and {inner} to refer to the names of the data frame you are unpacking. Details When there are no selected columns: if_any() will return FALSE , consistent with the behavior of any() when called without inputs. if_all() will return TRUE , consistent with the behavior of all() when called without inputs. Value across() typically returns a tibble with one column for each column in .cols and each function in .fns . If .unpack is used, more columns may be returned depending on how the results of .fns are unpacked. if_any() and if_all() return a logical vector. Timing of evaluation R code in dplyr verbs is generally evaluated once per group. Inside across() however, code is evaluated once for each combination of columns and groups. If the evaluation timing is important, for example if you're generating random variables, think about when it should happen and place your code in consequence. gdf <- tibble(g = c(1, 1, 2, 3), v1 = 10:13, v2 = 20:23) |> group_by(g) set.seed(1) # Outside: 1 normal variate n <- rnorm(1) gdf |> mutate(across(v1:v2, ~ .x + n)) #> # A tibble: 4 x 3 #> # Groups: g [3] #> g v1 v2 #> <dbl> <dbl> <dbl> #> 1 1 9.37 19.4 #> 2 1 10.4 20.4 #> 3 2 11.4 21.4 #> 4 3 12.4 22.4 # Inside a verb: 3 normal variates (ngroup) gdf |> mutate(n = rnorm(1), across(v1:v2, ~ .x + n)) #> # A tibble: 4 x 4 #> # Groups: g [3] #> g v1 v2 n #> <dbl> <dbl> <dbl> <dbl> #> 1 1 10.2 20.2 0.184 #> 2 1 11.2 21.2 0.184 #> 3 2 11.2 21.2 -0.836 #> 4 3 14.6 24.6 1.60 # Inside `across()`: 6 normal variates (ncol * ngroup) gdf |> mutate(across(v1:v2, ~ .x + rnorm(1))) #> # A tibble: 4 x 3 #> # Groups: g [3] #> g v1 v2 #> <dbl> <dbl> <dbl> #> 1 1 10.3 20.7 #> 2 1 11.3 21.7 #> 3 2 11.2 22.6 #> 4 3 13.5 22.7 See Also c_across() for a function that returns a vector Examples # For better printing iris <- as_tibble(iris) # across() ----------------------------------------------------------------- # Using everything() to apply the same function to all columns iris |> mutate(across(everything(), as.character)) # Different ways to select the same set of columns # See <https://tidyselect.r-lib.org/articles/syntax.html> for details iris |> mutate(across(c(Sepal.Length, Sepal.Width), round)) iris |> mutate(across(c(1, 2), round)) iris |> mutate(across(1:Sepal.Width, round)) iris |> mutate(across(where(is.double) &

Reference for dplyr (1.2.1)

80개 topic
across
Apply a function (or functions) across multiple columns
CRAN · 1.2.1 · dplyr/man/across.Rd · 2026-05-07

across() makes it easy to apply the same transformation to multiple columns, allowing you to use [=select]select() semantics inside in "data-masking" functions like [=summarise]summarise() and [=mutate]mutate(). See vignette("colwise") for more details. if_any() and if_all() apply the same predicate function to a selection of columns and combine the results into a single logical vector: if_any() is TRUE when the predicate is TRUE for any of the selected columns, if_all() is TRUE when the predicate is TRUE for all selected columns. If you just need to select columns without applying a transformation to each of them, then you probably want to use [=pick]pick() instead. across() supersedes the family of "scoped variants" like summarise_at(), summarise_if(), and summarise_all().

Aliases
acrossif_anyif_all
Usage
across(.cols, .fns, ..., .names = NULL, .unpack = FALSE) if_any(.cols, .fns, ..., .names = NULL) if_all(.cols, .fns, ..., .names = NULL)
Arguments
.cols
<[=dplyr_tidy_select]tidy-select> Columns to transform. You can't select grouping columns because they are already automatically handled by the verb (i.e. [=summarise]summarise() or [=mutate]mutate()).
.fns
Functions to apply to each of the selected columns. Possible values are: A function, e.g. mean. A purrr-style lambda, e.g. ~ mean(.x, na.rm = TRUE) A named list of functions or lambdas, e.g. list(mean = mean, n_miss = ~ sum(is.na(.x)). Each function is applied to each column, and the output is named by combining the function name and the column name using the glue specification in .names. Within these functions you can use [=cur_column]cur_column() and [=cur_group]cur_group() to access the current column and grouping keys respectively.
...
htmlhttps://lifecycle.r-lib.org/articles/stages.html#deprecatedlifecycle-deprecated.svgoptions: alt='[Deprecated]'[Deprecated] Additional arguments for the function calls in .fns are no longer accepted in ... because it's not clear when they should be evaluated: once per across() or once per group? Instead supply additional arguments directly in .fns by using a lambda. For example, instead of across(a:b, mean, na.rm = TRUE) write across(a:b, ~ mean(.x, na.rm = TRUE)).
.names
A glue specification that describes how to name the output columns. This can use .col to stand for the selected column name, and .fn to stand for the name of the function being applied. The default (NULL) is equivalent to ".col" for the single function case and ".col_.fn" for the case where a list is used for .fns.
.unpack
htmlhttps://lifecycle.r-lib.org/articles/stages.html#experimentallifecycle-experimental.svgoptions: alt='[Experimental]'[Experimental] Optionally [tidyr:pack]unpack data frames returned by functions in .fns, which expands the df-columns out into individual columns, retaining the number of rows in the data frame. If FALSE, the default, no unpacking is done. If TRUE, unpacking is done with a default glue specification of "outer_inner". Otherwise, a single glue specification can be supplied to describe how to name the unpacked columns. This can use outer to refer to the name originally generated by .names, and inner to refer to the names of the data frame you are unpacking.
Details
When there are no selected columns: if_any() will return FALSE, consistent with the behavior of any() when called without inputs. if_all() will return TRUE, consistent with the behavior of all() when called without inputs.
Value
across() typically returns a tibble with one column for each column in .cols and each function in .fns. If .unpack is used, more columns may be returned depending on how the results of .fns are unpacked. if_any() and if_all() return a logical vector.
Examples
# For better printing iris <- as_tibble(iris) # across() ----------------------------------------------------------------- # Using everything() to apply the same function to all columns iris |> mutate(across(everything(), as.character)) # Different ways to select the same set of columns # See <https://tidyselect.r-lib.org/articles/syntax.html> for details iris |> mutate(across(c(Sepal.Length, Sepal.Width), round)) iris |> mutate(across(c(1, 2), round)) iris |> mutate(across(1:Sepal.Width, round)) iris |> mutate(across(where(is.double) & !c(Petal.Length, Petal.Width), round)) # Using an external vector of names cols <- c("Sepal.Length", "Petal.Width") iris |> mutate(across(all_of(cols), round)) # If the external vector is named, the output columns will be named according # to those names names(cols) <- tolower(cols) iris |> mutate(across(all_of(cols), round)) # A purrr-style formula iris |> group_by(Species) |> summarise(across(starts_with("Sepal"), ~ mean(.x, na.rm = TRUE))) # A named list of functions iris |> group_by(Species) |> summarise(across(starts_with("Sepal"), list(mean = mean, sd = sd))) # Use the .names argument to control the output names iris |> group_by(Species) |> summarise(across(starts_with("Sepal"), mean, .names = "mean_.col")) iris |> group_by(Species) |> summarise( across( starts_with("Sepal"), list(mean = mean, sd = sd), .names = ".col..fn" ) ) # If a named external vector is used for column selection, .names will use # those names when constructing the output names iris |> group_by(Species) |> summarise(across(all_of(cols), mean, .names = "mean_.col")) # When the list is not named, .fn is replaced by the function's position iris |> group_by(Species) |> summarise( across(starts_with("Sepal"), list(mean, sd), .names = ".col.fn.fn") ) # When the functions in .fns return a data frame, you typically get a # "packed" data frame back quantile_df <- function(x, probs = c(0.25, 0.5, 0.75)) tibble(quantile = probs, value = quantile(x, probs)) iris |> reframe(across(starts_with("Sepal"), quantile_df)) # Use .unpack to automatically expand these packed data frames into their # individual columns iris |> reframe(across(starts_with("Sepal"), quantile_df, .unpack = TRUE)) # .unpack can utilize a glue specification if you don't like the defaults iris |> reframe( across(starts_with("Sepal"), quantile_df, .unpack = "outer.inner") ) # This is also useful inside mutate(), for example, with a multi-lag helper multilag <- function(x, lags = 1:3) names(lags) <- as.character(lags) purrr::map_dfr(lags, lag, x = x) iris |> group_by(Species) |> mutate(across(starts_with("Sepal"), multilag, .unpack = TRUE)) |> select(Species, starts_with("Sepal")) # if_any() and if_all() ---------------------------------------------------- iris |> filter(if_any(ends_with("Width"), ~ . > 4)) iris |> filter_out(if_any(ends_with("Width"), ~ . > 4)) iris |> filter(if_all(ends_with("Width"), ~ . > 2)) iris |> filter_out(if_all(ends_with("Width"), ~ . > 2))
See also
[=c_across]c_across() for a function that returns a vector
Custom sections
Timing of evaluation
R code in dplyr verbs is generally evaluated once per group. Inside across() however, code is evaluated once for each combination of columns and groups. If the evaluation timing is important, for example if you're generating random variables, think about when it should happen and place your code in consequence. html<div class="sourceCode r">gdf <- tibble(g = c(1, 1, 2, 3), v1 = 10:13, v2 = 20:23) |> group_by(g) set.seed(1) # Outside: 1 normal variate n <- rnorm(1) gdf |> mutate(across(v1:v2, ~ .x + n)) #> # A tibble: 4 x 3 #> # Groups: g [3] #> g v1 v2 #> <dbl> <dbl> <dbl> #> 1 1 9.37 19.4 #> 2 1 10.4 20.4 #> 3 2 11.4 21.4 #> 4 3 12.4 22.4 # Inside a verb: 3 normal variates (ngroup) gdf |> mutate(n = rnorm(1), across(v1:v2, ~ .x + n)) #> # A tibble: 4 x 4 #> # Groups: g [3] #> g v1 v2 n #> <dbl> <dbl> <dbl> <dbl> #> 1 1 10.2 20.2 0.184 #> 2 1 11.2 21.2 0.184 #> 3 2 11.2 21.2 -0.836 #> 4 3 14.6 24.6 1.60 # Inside `across()`: 6 normal variates (ncol * ngroup) gdf |> mutate(across(v1:v2, ~ .x + rnorm(1))) #> # A tibble: 4 x 3 #> # Groups: g [3] #> g v1 v2 #> <dbl> <dbl> <dbl> #> 1 1 10.3 20.7 #> 2 1 11.3 21.7 #> 3 2 11.2 22.6 #> 4 3 13.5 22.7 html</div>
all_equal
Flexible equality comparison for data frames
CRAN · 1.2.1 · dplyr/man/all_equal.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#deprecatedlifecycle-deprecated.svgoptions: alt='[Deprecated]'[Deprecated] all_equal() allows you to compare data frames, optionally ignoring row and column names. It is deprecated as of dplyr 1.1.0, because it makes it too easy to ignore important differences.

Aliases
all_equal
Keywords
internal
Usage
all_equal( target, current, ignore_col_order = TRUE, ignore_row_order = TRUE, convert = FALSE, ... )
Arguments
target, current
Two data frames to compare.
ignore_col_order
Should order of columns be ignored?
ignore_row_order
Should order of rows be ignored?
convert
Should similar classes be converted? Currently this will convert factor to character and integer to double.
...
Ignored. Needed for compatibility with all.equal().
Value
TRUE if equal, otherwise a character vector describing the reasons why they're not equal. Use [=isTRUE]isTRUE() if using the result in an if expression.
Examples
scramble <- function(x) x[sample(nrow(x)), sample(ncol(x))] # `all_equal()` ignored row and column ordering by default, # but we now feel that that makes it too easy to make mistakes mtcars2 <- scramble(mtcars) all_equal(mtcars, mtcars2) # Instead, be explicit about the row and column ordering all.equal( mtcars, mtcars2[rownames(mtcars), names(mtcars)] )
all_vars
Apply predicate to all variables
CRAN · 1.2.1 · dplyr/man/all_vars.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#supersededlifecycle-superseded.svgoptions: alt='[Superseded]'[Superseded] all_vars() and any_vars() were only needed for the scoped verbs, which have been superseded by the use of [=across]across() in an existing verb. See vignette("colwise") for details. These quoting functions signal to scoped filtering verbs (e.g. [=filter_if]filter_if() or [=filter_all]filter_all()) that a predicate expression should be applied to all relevant variables. The all_vars() variant takes the intersection of the predicate expressions with & while the any_vars() variant takes the union with |.

Aliases
all_varsany_vars
Usage
all_vars(expr) any_vars(expr)
Arguments
expr
<[rlang:args_data_masking]data-masking> An expression that returns a logical vector, using . to refer to the "current" variable.
See also
[=vars]vars() for other quoting functions that you can use with scoped verbs.
args_by
Helper for consistent documentation of .by
CRAN · 1.2.1 · dplyr/man/args_by.Rd · 2026-05-07

Use @inheritParams args_by to consistently document .by.

Aliases
args_by
Keywords
internal
Arguments
.by
<[=dplyr_tidy_select]tidy-select> Optionally, a selection of columns to group by for just this operation, functioning as an alternative to [=group_by]group_by(). For details and examples, see [=dplyr_by]?dplyr_by.
arrange
Order rows using column values
CRAN · 1.2.1 · dplyr/man/arrange.Rd · 2026-05-07

arrange() orders the rows of a data frame by the values of selected columns. Unlike other dplyr verbs, arrange() largely ignores grouping; you need to explicitly mention grouping variables (or use .by_group = TRUE) in order to group by them, and functions of variables are evaluated once per data frame, not once per group.

Aliases
arrangearrange.data.frame
Concepts
single table verbs
Usage
arrange(.data, ..., .by_group = FALSE) arrangedata.frame(.data, ..., .by_group = FALSE, .locale = NULL)
Arguments
.data
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
...
<[rlang:args_data_masking]data-masking> Variables, or functions of variables. Use [=desc]desc() to sort a variable in descending order.
.by_group
If TRUE, will sort first by grouping variable. Applies to grouped data frames only.
.locale
The locale to sort character vectors in. If NULL, the default, uses the "C" locale unless the deprecated dplyr.legacy_locale global option escape hatch is active. See the dplyr-locale help page for more details. If a single string from [stringi:stri_locale_list]stringi::stri_locale_list() is supplied, then this will be used as the locale to sort with. For example, "en" will sort with the American English locale. This requires the stringi package. If "C" is supplied, then character vectors will always be sorted in the C locale. This does not require stringi and is often much faster than supplying a locale identifier. The C locale is not the same as English locales, such as "en", particularly when it comes to data containing a mix of upper and lower case letters. This is explained in more detail on the [=dplyr-locale]locale help page under the Default locale section.
Details
Missing values Unlike base sorting with sort(), NA are: always sorted to the end for local data, even when wrapped with desc(). treated differently for remote data, depending on the backend.
Value
An object of the same type as .data. The output has the following properties: All rows appear in the output, but (usually) in a different place. Columns are not modified. Groups are not modified. Data frame attributes are preserved.
Examples
arrange(mtcars, cyl, disp) arrange(mtcars, desc(disp)) # grouped arrange ignores groups by_cyl <- mtcars |> group_by(cyl) by_cyl |> arrange(desc(wt)) # Unless you specifically ask: by_cyl |> arrange(desc(wt), .by_group = TRUE) # use embracing when wrapping in a function; # see ?rlang::args_data_masking for more details tidy_eval_arrange <- function(.data, var) .data |> arrange( var ) tidy_eval_arrange(mtcars, mpg) # Use `across()` or `pick()` to select columns with tidy-select iris |> arrange(pick(starts_with("Sepal"))) iris |> arrange(across(starts_with("Sepal"), desc))
See also
Other single table verbs: filter(), mutate(), reframe(), rename(), select(), slice(), summarise()
Custom sections
Methods
This function is a generic, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. The following methods are currently available in loaded packages: [stage=render,results=rd]dplyr:::methods_rd("arrange").
arrange_all
Arrange rows by a selection of variables
CRAN · 1.2.1 · dplyr/man/arrange_all.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#supersededlifecycle-superseded.svgoptions: alt='[Superseded]'[Superseded] Scoped verbs (_if, _at, _all) have been superseded by the use of [=pick]pick() or [=across]across() in an existing verb. See vignette("colwise") for details. These scoped variants of [=arrange]arrange() sort a data frame by a selection of variables. Like [=arrange]arrange(), you can modify the variables before ordering with the .funs argument.

Aliases
arrange_allarrange_atarrange_if
Keywords
internal
Usage
arrange_all(.tbl, .funs = list(), ..., .by_group = FALSE, .locale = NULL) arrange_at(.tbl, .vars, .funs = list(), ..., .by_group = FALSE, .locale = NULL) arrange_if( .tbl, .predicate, .funs = list(), ..., .by_group = FALSE, .locale = NULL )
Arguments
.tbl
A tbl object.
.funs
A function fun, a quosure style lambda ~ fun(.) or a list of either form.
...
Additional arguments for the function calls in .funs. These are evaluated only once, with [rlang:dyn-dots]tidy dots support.
.by_group
If TRUE, will sort first by grouping variable. Applies to grouped data frames only.
.locale
The locale to sort character vectors in. If NULL, the default, uses the "C" locale unless the deprecated dplyr.legacy_locale global option escape hatch is active. See the dplyr-locale help page for more details. If a single string from [stringi:stri_locale_list]stringi::stri_locale_list() is supplied, then this will be used as the locale to sort with. For example, "en" will sort with the American English locale. This requires the stringi package. If "C" is supplied, then character vectors will always be sorted in the C locale. This does not require stringi and is often much faster than supplying a locale identifier. The C locale is not the same as English locales, such as "en", particularly when it comes to data containing a mix of upper and lower case letters. This is explained in more detail on the [=dplyr-locale]locale help page under the Default locale section.
.vars
A list of columns generated by [=vars]vars(), a character vector of column names, a numeric vector of column positions, or NULL.
.predicate
A predicate function to be applied to the columns or a logical vector. The variables for which .predicate is or returns TRUE are selected. This argument is passed to [rlang:as_function]rlang::as_function() and thus supports quosure-style lambda functions and strings representing function names.
Examples
df <- as_tibble(mtcars) arrange_all(df) # -> arrange(df, pick(everything())) arrange_all(df, desc) # -> arrange(df, across(everything(), desc))
Custom sections
Grouping variables
The grouping variables that are part of the selection participate in the sorting of the data frame.
auto_copy
Copy tables to same source, if necessary
CRAN · 1.2.1 · dplyr/man/auto_copy.Rd · 2026-05-07

Copy tables to same source, if necessary

Aliases
auto_copy
Usage
auto_copy(x, y, copy = FALSE, ...)
Arguments
x, y
y will be copied to x, if necessary.
copy
If x and y are not from the same data source, and copy is TRUE, then y will be copied into the same src as x. This allows you to join tables across srcs, but it is a potentially expensive operation so you must opt into it.
...
Other arguments passed on to methods.
backend_dbplyr
Database and SQL generics.
CRAN · 1.2.1 · dplyr/man/backend_dbplyr.Rd · 2026-05-07

The sql_ generics are used to build the different types of SQL queries. The default implementations in dbplyr generates ANSI 92 compliant SQL. The db_ generics execute actions on the database. The default implementations in dbplyr typically just call the standard DBI S4 method.

Aliases
backend_dbplyrdb_descsql_translate_envdb_list_tablesdb_has_tabledb_data_typedb_save_querydb_begindb_commitdb_rollbackdb_write_tabledb_create_tabledb_insert_intodb_create_indexesdb_create_indexdb_drop_tabledb_analyzedb_explaindb_query_fieldsdb_query_rowssql_selectsql_subquerysql_joinsql_semi_joinsql_set_opsql_escape_stringsql_escape_ident
Keywords
internal
Usage
db_desc(x) sql_translate_env(con) db_list_tables(con) db_has_table(con, table) db_data_type(con, fields) db_save_query(con, sql, name, temporary = TRUE, ...) db_begin(con, ...) db_commit(con, ...) db_rollback(con, ...) db_write_table(con, table, types, values, temporary = FALSE, ...) db_create_table(con, table, types, temporary = FALSE, ...) db_insert_into(con, table, values, ...) db_create_indexes(con, table, indexes = NULL, unique = FALSE, ...) db_create_index(con, table, columns, name = NULL, unique = FALSE, ...) db_drop_table(con, table, force = FALSE, ...) db_analyze(con, table, ...) db_explain(con, sql, ...) db_query_fields(con, sql, ...) db_query_rows(con, sql, ...) sql_select( con, select, from, where = NULL, group_by = NULL, having = NULL, order_by = NULL, limit = NULL, distinct = FALSE, ... ) sql_subquery(con, from, name = random_table_name(), ...) sql_join(con, x, y, vars, type = "inner", by = NULL, ...) sql_semi_join(con, x, y, anti = FALSE, by = NULL, ...) sql_set_op(con, x, y, method) sql_escape_string(con, x) sql_escape_ident(con, x)
Arguments
con
A database connection.
table
A string, the table name.
fields
A list of fields, as in a data frame.
Details
A few backend methods do not call the standard DBI S4 methods including db_data_type(): Calls [DBI:dbDataType]DBI::dbDataType() for every field (e.g. data frame column) and returns a vector of corresponding SQL data types db_save_query(): Builds and executes a CREATE [TEMPORARY] TABLE <table> ... SQL command. db_create_index(): Builds and executes a CREATE INDEX <name> ON <table> SQL command. db_drop_table(): Builds and executes a DROP TABLE [IF EXISTS] <table> SQL command. db_analyze(): Builds and executes an ANALYZE <table> SQL command. Currently, [=copy_to]copy_to() is the only user of db_begin(), db_commit(), db_rollback(), db_write_table(), db_create_indexes(), db_drop_table() and db_analyze(). If you find yourself overriding many of these functions it may suggest that you should just override copy_to() instead. db_create_table() and db_insert_into() have been deprecated in favour of db_write_table().
Value
Usually a logical value indicating success. Most failures should generate an error. However, db_has_table() should return NA if temporary tables cannot be listed with [DBI:dbListTables]DBI::dbListTables() (due to backend API limitations for example). As a result, you methods will rely on the backend to throw an error if a table exists when it shouldn't.
band_members
Band membership
CRAN · 1.2.1 · data · dplyr/man/band_members.Rd · 2026-05-07

These data sets describe band members of the Beatles and Rolling Stones. They are toy data sets that can be displayed in their entirety on a slide (e.g. to demonstrate a join).

Aliases
band_membersband_instrumentsband_instruments2
Keywords
datasets
Usage
band_members band_instruments band_instruments2
Details
band_instruments and band_instruments2 contain the same data but use different column names for the first column of the data set. band_instruments uses name, which matches the name of the key column of band_members; band_instruments2 uses artist, which does not.
Format
Each is a tibble with two variables and three observations
Examples
band_members band_instruments band_instruments2
between
Detect where values fall in a specified range
CRAN · 1.2.1 · dplyr/man/between.Rd · 2026-05-07

This is a shortcut for x >= left & x <= right, implemented for local vectors and translated to the appropriate SQL for remote tables.

Aliases
between
Usage
between(x, left, right, ..., ptype = NULL)
Arguments
x
A vector
left, right
Boundary values. Both left and right are recycled to the size of x.
...
These dots are for future extensions and must be empty.
ptype
An optional prototype giving the desired output type. The default is to compute the common type of x, left, and right using [vctrs:vec_cast]vctrs::vec_cast_common().
Details
x, left, and right are all cast to their common type before the comparison is made. Use the ptype argument to specify the type manually.
Value
A logical vector the same size as x with a type determined by ptype.
Examples
between(1:12, 7, 9) x <- rnorm(1e2) x[between(x, -1, 1)] # On a tibble using `filter()` filter(starwars, between(height, 100, 150)) # Using the `ptype` argument with ordered factors, where otherwise everything # is cast to the common type of character before the comparison x <- ordered( c("low", "medium", "high", "medium"), levels = c("low", "medium", "high") ) between(x, "medium", "high") between(x, "medium", "high", ptype = x)
See also
[=join_by]join_by() if you are looking for documentation for the between() overlap join helper.
bind_cols
Bind multiple data frames by column
CRAN · 1.2.1 · dplyr/man/bind_cols.Rd · 2026-05-07

Bind any number of data frames by column, making a wider result. This is similar to do.call(cbind, dfs). Where possible prefer using a [=left_join]join to combine multiple data frames. bind_cols() binds the rows in order in which they appear so it is easy to create meaningless results without realising it.

Aliases
bind_cols
Usage
bind_cols( ..., .name_repair = c("unique", "universal", "check_unique", "minimal") )
Arguments
...
Data frames to combine. Each argument can either be a data frame, a list that could be a data frame, or a list of data frames. Inputs are [vctrs:theory-faq-recycling]recycled to the same length, then matched by position.
.name_repair
One of "unique", "universal", or "check_unique". See [vctrs:vec_as_names]vctrs::vec_as_names() for the meaning of these options.
Value
A data frame the same type as the first element of ....
Examples
df1 <- tibble(x = 1:3) df2 <- tibble(y = 3:1) bind_cols(df1, df2) # Row sizes must be compatible when column-binding try(bind_cols(tibble(x = 1:3), tibble(y = 1:2)))
bind_rows
Bind multiple data frames by row
CRAN · 1.2.1 · dplyr/man/bind_rows.Rd · 2026-05-07

Bind any number of data frames by row, making a longer result. This is similar to do.call(rbind, dfs), but the output will contain all columns that appear in any of the inputs.

Aliases
bind_rowsbind
Usage
bind_rows(..., .id = NULL)
Arguments
...
Data frames to combine. Each argument can either be a data frame, a list that could be a data frame, or a list of data frames. Columns are matched by name, and any missing columns will be filled with NA.
.id
The name of an optional identifier column. Provide a string to create an output column that identifies each input. The column will use names if available, otherwise it will use positions.
Value
A data frame the same type as the first element of ....
Examples
df1 <- tibble(x = 1:2, y = letters[1:2]) df2 <- tibble(x = 4:5, z = 1:2) # You can supply individual data frames as arguments: bind_rows(df1, df2) # Or a list of data frames: bind_rows(list(df1, df2)) # When you supply a column name with the `.id` argument, a new # column is created to link each row to its original data frame bind_rows(list(df1, df2), .id = "id") bind_rows(list(a = df1, b = df2), .id = "id")
c_across
Combine values from multiple columns
CRAN · 1.2.1 · dplyr/man/c_across.Rd · 2026-05-07

c_across() is designed to work with [=rowwise]rowwise() to make it easy to perform row-wise aggregations. It has two differences from c(): It uses tidy select semantics so you can easily select multiple variables. See vignette("rowwise") for more details. It uses [vctrs:vec_c]vctrs::vec_c() in order to give safer outputs.

Aliases
c_across
Usage
c_across(cols)
Arguments
cols
<[=dplyr_tidy_select]tidy-select> Columns to transform. You can't select grouping columns because they are already automatically handled by the verb (i.e. [=summarise]summarise() or [=mutate]mutate()).
Examples
df <- tibble(id = 1:4, w = runif(4), x = runif(4), y = runif(4), z = runif(4)) df |> rowwise() |> mutate( sum = sum(c_across(w:z)), sd = sd(c_across(w:z)) )
See also
[=across]across() for a function that returns a tibble.
case-and-replace-when
A general vectorised if-else
CRAN · 1.2.1 · dplyr/man/case-and-replace-when.Rd · 2026-05-07

case_when() and replace_when() are two forms of vectorized [=if_else]if_else(). They work by evaluating each case sequentially and using the first match for each element to determine the corresponding value in the output vector. Use case_when() when creating an entirely new vector. Use replace_when() when partially updating an existing vector. If you are just replacing a few values within an existing vector, then replace_when() is always a better choice because it is type stable, size stable, pipes better, and better expresses intent. A major difference between the two functions is what happens when no cases match: case_when() falls through to a .default as a final "else" statement. replace_when() retains the original values from x. See vignette("recoding-replacing") for more examples.

Aliases
case-and-replace-whencase_whenreplace_when
Usage
case_when( ..., .default = NULL, .unmatched = "default", .ptype = NULL, .size = NULL ) replace_when(x, ...)
Arguments
...
<[rlang:dyn-dots]dynamic-dots> A sequence of two-sided formulas. The left hand side (LHS) determines which values match this case. The right hand side (RHS) provides the replacement value. For case_when(): The LHS inputs must be logical vectors. For backwards compatibility, scalars are [vctrs:theory-faq-recycling]recycled, but we no longer recommend supplying scalars. The RHS inputs will be [vctrs:theory-faq-coercion]cast to their common type, and will be [vctrs:theory-faq-recycling]recycled to the common size of the LHS inputs. For replace_when(): The LHS inputs must be logical vectors the same size as x. The RHS inputs will be [vctrs:theory-faq-coercion]cast to the type of x and [vctrs:theory-faq-recycling]recycled to the size of x. NULL inputs are ignored.
.default
The value used when all of the LHS inputs return either FALSE or NA. If NULL, the default, a missing value will be used. If provided, .default will follow the same type and size rules as the RHS inputs. NA values in the LHS conditions are treated like FALSE, meaning that the result at those locations will be assigned the .default value. To handle missing values in the conditions differently, you must explicitly catch them with another condition before they fall through to the .default. This typically involves some variation of is.na(x) ~ value tailored to your usage of case_when().
.unmatched
Handling of unmatched locations. One of: "default" to use .default in unmatched locations. "error" to error when there are unmatched locations.
.ptype
An optional prototype declaring the desired output type. If supplied, this overrides the common type of the RHS inputs.
.size
An optional size declaring the desired output size. If supplied, this overrides the common size computed from the LHS inputs.
x
A vector.
Value
For case_when(), a new vector where the size is the common size of the LHS inputs, the type is the common type of the RHS inputs, and the names correspond to the names of the RHS elements used in the result. For replace_when(), an updated version of x, with the same size, type, and names as x.
Examples
x <- 1:70 case_when( x %% 35 == 0 ~ "fizz buzz", x %% 5 == 0 ~ "fizz", x %% 7 == 0 ~ "buzz", .default = as.character(x) ) # Like an if statement, the arguments are evaluated in order, so you must # proceed from the most specific to the most general. This won't work: case_when( x %% 5 == 0 ~ "fizz", x %% 7 == 0 ~ "buzz", x %% 35 == 0 ~ "fizz buzz", .default = as.character(x) ) # If none of the cases match and no `.default` is supplied, NA is used: case_when( x %% 35 == 0 ~ "fizz buzz", x %% 5 == 0 ~ "fizz", x %% 7 == 0 ~ "buzz" ) # Note that `NA` values on the LHS are treated like `FALSE` and will be # assigned the `.default` value. You must handle them explicitly if you # want to use a different value. The exact way to handle missing values is # dependent on the set of LHS conditions you use. x[2:4] <- NA_real_ case_when( x %% 35 == 0 ~ "fizz buzz", x %% 5 == 0 ~ "fizz", x %% 7 == 0 ~ "buzz", is.na(x) ~ "nope", .default = as.character(x) ) # `case_when()` is not a replacement for basic if/else control flow. When # you have a single scalar condition, using if/else is faster, simpler to # reason about, and is lazy on the branch that isn't run. For example, this # seems to work: x <- "value" case_when(is.character(x) ~ x, .default = "not-a-character") # Until `x` is a non-character type x <- 1 try(case_when(is.character(x) ~ x, .default = "not-a-character")) # Instead, you should use if/else if (is.character(x)) y <- x else y <- "not-a-character" y # If you believe that you've covered every possible case, then set # `.unmatched = "error"` rather than supplying a `.default`. This adds an # extra layer of safety to `case_when()` and is particularly useful when you # have a series of complex expressions! set.seed(123) x <- sample(50) # Oops, we forgot to handle `50` try(case_when( x < 10 ~ "ten", x < 20 ~ "twenty", x < 30 ~ "thirty", x < 40 ~ "forty", x < 50 ~ "fifty", .unmatched = "error" )) case_when( x < 10 ~ "ten", x < 20 ~ "twenty", x < 30 ~ "thirty", x < 40 ~ "forty", x <= 50 ~ "fifty", .unmatched = "error" ) # Note that `NA` is considered unmatched and must be handled with its own # explicit case, even if that case just propagates the missing value! x[c(2, 5)] <- NA case_when( x < 10 ~ "ten", x < 20 ~ "twenty", x < 30 ~ "thirty", x < 40 ~ "forty", x <= 50 ~ "fifty", is.na(x) ~ NA, .unmatched = "error" ) # `replace_when()` is useful when you're updating an existing vector, # rather than creating an entirely new one. Note the so-far unused "puppy" # factor level: pets <- tibble( name = c("Max", "Bella", "Chuck", "Luna", "Cooper"), type = factor( c("dog", "dog", "cat", "dog", "cat"), levels = c("dog", "cat", "puppy") ), age = c(1, 3, 5, 2, 4) ) # We can replace some values with `"puppy"` based on arbitrary conditions. # Even though we are using a character `"puppy"` value, `replace_when()` will # automatically cast it to the factor type of `type` for us. pets |> mutate( type = replace_when(type, type == "dog" & age <= 2 ~ "puppy") ) # Compare that with this `case_when()` call, which loses the factor class. # It's always better to use `replace_when()` when updating a few values in # an existing vector! pets |> mutate( type = case_when(type == "dog" & age <= 2 ~ "puppy", .default = type) ) # `case_when()` and `replace_when()` evaluate all RHS expressions, and then # construct their result by extracting the selected (via the LHS expressions) # parts. For example, `NaN`s are produced here because `sqrt(y)` is evaluated # on all of `y`, not just where `y >= 0`. y <- seq(-2, 2, by = .5) replace_when(y, y >= 0 ~ sqrt(y)) # These functions are particularly useful inside `mutate()` when you want to # create a new variable that relies on a complex combination of existing # variables starwars |> select(name:mass, gender, species) |> mutate( type = case_when( height > 200 | mass > 200 ~ "large", species == "Droid" ~ "robot", .default = "other" ) ) # `case_when()` is not a tidy eval function. If you'd like to reuse # the same patterns, extract the `case_when()` call into a normal # function: case_character_type <- function(height, mass, species) case_when( height > 200 | mass > 200 ~ "large", species == "Droid" ~ "robot", .default = "other" ) case_character_type(150, 250, "Droid") case_character_type(150, 150, "Droid") # Such functions can be used inside `mutate()` as well: starwars |> mutate(type = case_character_type(height, mass, species)) |> pull(type) # `case_when()` ignores `NULL` inputs. This is useful when you'd # like to use a pattern only under certain conditions. Here we'll # take advantage of the fact that `if` returns `NULL` when there is # no `else` clause: case_character_type <- function(height, mass, species, robots = TRUE) case_when( height > 200 | mass > 200 ~ "large", if (robots) species == "Droid" ~ "robot", .default = "other" ) starwars |> mutate(type = case_character_type(height, mass, species, robots = FALSE)) |> pull(type) # `replace_when()` can also be used in combination with `pick()` to # conditionally mutate rows within multiple columns using a single condition. # Here `replace_when()` returns a data frame with new `species` and `name` # columns, which `mutate()` then automatically unpacks. starwars |> select(homeworld, species, name) |> mutate(replace_when( pick(species, name), homeworld == "Tatooine" ~ tibble( species = "Tatooinese", name = paste(name, "(Tatooine)") ) ))
See also
[=recode_values]recode_values(), [vctrs:vec-case-and-replace]vctrs::vec_case_when()
case_match
A general vectorised switch()
CRAN · 1.2.1 · dplyr/man/case_match.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#deprecatedlifecycle-deprecated.svgoptions: alt='[Deprecated]'[Deprecated] case_match() is deprecated. Please use [=recode_values]recode_values() and [=replace_values]replace_values() instead, which are more powerful, have more intuitive names, and have better safety. In addition to the familiar two-sided formula interface, these functions also have from and to arguments which allow you to incorporate a lookup table into the recoding process. This function allows you to vectorise multiple [=switch]switch() statements. Each case is evaluated sequentially and the first match for each element determines the corresponding value in the output vector. If no cases match, the .default is used.

Aliases
case_match
Keywords
internal
Usage
case_match(.x, ..., .default = NULL, .ptype = NULL)
Arguments
.x
A vector to match against.
...
<[rlang:dyn-dots]dynamic-dots> A sequence of two-sided formulas: old_values ~ new_value. The right hand side (RHS) determines the output value for all values of .x that match the left hand side (LHS). The LHS must evaluate to the same type of vector as .x. It can be any length, allowing you to map multiple .x values to the same RHS value. If a value is repeated in the LHS, i.e. a value in .x matches to multiple cases, the first match is used. The RHS inputs will be coerced to their common type. Each RHS input will be [vctrs:theory-faq-recycling]recycled to the size of .x.
.default
The value used when values in .x aren't matched by any of the LHS inputs. If NULL, the default, a missing value will be used. .default is [vctrs:theory-faq-recycling]recycled to the size of .x.
.ptype
An optional prototype declaring the desired output type. If not supplied, the output type will be taken from the common type of all RHS inputs and .default.
Value
A vector with the same size as .x and the same type as the common type of the RHS inputs and .default (if not overridden by .ptype).
Examples
# `case_match()` is deprecated and has been replaced by `recode_values()` and # `replace_values()` x <- c("a", "b", "a", "d", "b", NA, "c", "e") # `recode_values()` is a 1:1 replacement for `case_match()` case_match( x, "a" ~ 1, "b" ~ 2, "c" ~ 3, "d" ~ 4 ) recode_values( x, "a" ~ 1, "b" ~ 2, "c" ~ 3, "d" ~ 4 ) # `recode_values()` has an additional `unmatched` argument to help you catch # missed mappings try(recode_values( x, "a" ~ 1, "b" ~ 2, "c" ~ 3, "d" ~ 4, unmatched = "error" )) # `recode_values()` also has additional `from` and `to` arguments, which are # useful when your lookup table is defined elsewhere (for example, it could # be read in from a CSV file). This is very difficult to do with # `case_match()`! lookup <- tribble( ~from, ~to, "a", 1, "b", 2, "c", 3, "d", 4 ) recode_values(x, from = lookup$from, to = lookup$to) # Both `case_match()` and `recode_values()` work with more than just # character inputs: y <- as.integer(c(1, 2, 1, 3, 1, NA, 2, 4)) case_match( y, c(1, 3) ~ "odd", c(2, 4) ~ "even", .default = "missing" ) recode_values( y, c(1, 3) ~ "odd", c(2, 4) ~ "even", default = "missing" ) # Or with a lookup table lookup <- tribble( ~from, ~to, c(1, 3), "odd", c(2, 4), "even" ) recode_values(y, from = lookup$from, to = lookup$to, default = "missing") # `replace_values()` is a convenient way to replace selected values, leaving # everything else as is. It's similar to `case_match(y, .default = y)`. replace_values(y, NA ~ 0) case_match(y, NA ~ 0, .default = y) # Notably, `replace_values()` is type stable, which means that `y` can't # change types out from under you, unlike with `case_match()`! typeof(y) typeof(replace_values(y, NA ~ 0)) typeof(case_match(y, NA ~ 0, .default = y)) # We believe that `replace_values()` better expresses intent when doing a # partial replacement. Compare these two `mutate()` calls, each with the # goals of: # - Replace missings in `hair_color` # - Replace some of the `species` starwars |> mutate( hair_color = case_match(hair_color, NA ~ "unknown", .default = hair_color), species = case_match( species, "Human" ~ "Humanoid", "Droid" ~ "Robot", c("Wookiee", "Ewok") ~ "Hairy", .default = species ), .keep = "used" ) updates <- tribble( ~from, ~to, "Human", "Humanoid", "Droid", "Robot", c("Wookiee", "Ewok"), "Hairy" ) starwars |> mutate( hair_color = replace_values(hair_color, NA ~ "unknown"), species = replace_values(species, from = updates$from, to = updates$to), .keep = "used" )
check_dbplyr
dbplyr compatibility functions
CRAN · 1.2.1 · dplyr/man/check_dbplyr.Rd · 2026-05-07

In dplyr 0.7.0, a number of database and SQL functions moved from dplyr to dbplyr. The generic functions stayed in dplyr (since there is no easy way to conditionally import a generic from different packages), but many other SQL and database helper functions moved. If you have written a backend, these functions generate the code you need to work with both dplyr 0.5.0 dplyr 0.7.0.

Aliases
check_dbplyrwrap_dbplyr_obj
Keywords
internal
Usage
check_dbplyr() wrap_dbplyr_obj(obj_name)
Examples
if (requireNamespace("dbplyr", quietly = TRUE)) withAutoprint(\ # examplesIf wrap_dbplyr_obj("build_sql") wrap_dbplyr_obj("base_agg") \) # examplesIf
coalesce
Find the first non-missing element
CRAN · 1.2.1 · dplyr/man/coalesce.Rd · 2026-05-07

Given a set of vectors, coalesce() finds the first non-missing value at each position. It's inspired by the SQL COALESCE function which does the same thing for SQL NULLs.

Aliases
coalesce
Usage
coalesce(..., .ptype = NULL, .size = NULL)
Arguments
...
<[rlang:dyn-dots]dynamic-dots> One or more vectors. These will be [vctrs:theory-faq-recycling]recycled against each other, and will be cast to their common type.
.ptype
An optional prototype declaring the desired output type. If supplied, this overrides the common type of the vectors in ....
.size
An optional size declaring the desired output size. If supplied, this overrides the common size of the vectors in ....
Value
A vector with the same type and size as the common type and common size of the vectors in ....
Examples
# Replace missing values with a single value x <- sample(c(1:5, NA, NA, NA)) coalesce(x, 0L) # Or replace missing values with the corresponding non-missing value in # another vector x <- c(1, 2, NA, NA, 5, NA) y <- c(NA, NA, 3, 4, 5, NA) coalesce(x, y) # For cases like these where your replacement is a single value or a single # vector, `replace_values()` works just as well replace_values(x, NA ~ 0) coalesce(x, 0) replace_values(x, NA ~ y) coalesce(x, y) # `coalesce()` really shines when you have >2 vectors to coalesce with z <- c(NA, 2, 3, 4, 5, 6) coalesce(x, y, z) # If you're looking to replace values with `NA`, rather than replacing `NA` # with a value, then use `replace_values()` x <- c(0, -1, 5, -99, 8) replace_values(x, c(-1, -99) ~ NA) # The equivalent to a missing value in a list is `NULL` coalesce(list(1, 2, NULL, NA), list(0)) # Supply lists of vectors by splicing them into dots vecs <- list( c(1, 2, NA, NA, 5), c(NA, NA, 3, 4, 5) ) coalesce(!!!vecs)
See also
[=na_if]na_if() to replace a specified value with NA. [=replace_values]replace_values() for making arbitrary replacements by value. [=replace_when]replace_when() for making arbitrary replacements using logical conditions.
common_by
Extract out common by variables
CRAN · 1.2.1 · dplyr/man/common_by.Rd · 2026-05-07

Extract out common by variables

Aliases
common_by
Keywords
internal
Usage
common_by(by = NULL, x, y)
compute
Force computation of a database query
CRAN · 1.2.1 · dplyr/man/compute.Rd · 2026-05-07

compute() stores results in a remote temporary table. collect() retrieves data into a local tibble. collapse() is slightly different: it doesn't force computation, but instead forces generation of the SQL query. This is sometimes needed to work around bugs in dplyr's SQL generation. All functions preserve grouping and ordering.

Aliases
computecollectcollapse
Usage
compute(x, ...) collect(x, ...) collapse(x, ...)
Arguments
x
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
...
Arguments passed on to methods
Examples
if (requireNamespace("dbplyr", quietly = TRUE) && requireNamespace("RSQLite", quietly = TRUE)) withAutoprint(\ # examplesIf mtcars2 <- dbplyr::src_memdb() |> copy_to(mtcars, name = "mtcars2-cc", overwrite = TRUE) remote <- mtcars2 |> filter(cyl == 8) |> select(mpg:drat) # Compute query and save in remote table compute(remote) # Compute query bring back to this session collect(remote) # Creates a fresh query based on the generated SQL collapse(remote) \) # examplesIf
See also
[=copy_to]copy_to(), the opposite of collect(): it takes a local data frame and uploads it to the remote source.
Custom sections
Methods
These functions are generics, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. Methods available in currently loaded packages: compute(): [stage=render,results=rd]dplyr:::methods_rd("compute") collect(): [stage=render,results=rd]dplyr:::methods_rd("collect") collapse(): [stage=render,results=rd]dplyr:::methods_rd("collapse")
consecutive_id
Generate a unique identifier for consecutive combinations
CRAN · 1.2.1 · dplyr/man/consecutive_id.Rd · 2026-05-07

consecutive_id() generates a unique identifier that increments every time a variable (or combination of variables) changes. Inspired by data.table::rleid().

Aliases
consecutive_id
Usage
consecutive_id(...)
Arguments
...
Unnamed vectors. If multiple vectors are supplied, then they should have the same length.
Value
A numeric vector the same length as the longest element of ....
Examples
consecutive_id(c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, NA, NA)) consecutive_id(c(1, 1, 1, 2, 1, 1, 2, 2)) df <- data.frame(x = c(0, 0, 1, 0), y = c(2, 2, 2, 2)) df |> group_by(x, y) |> summarise(n = n()) df |> group_by(id = consecutive_id(x, y), x, y) |> summarise(n = n())
context
Information about the "current" group or variable
CRAN · 1.2.1 · dplyr/man/context.Rd · 2026-05-07

These functions return information about the "current" group or "current" variable, so only work inside specific contexts like [=summarise]summarise() and [=mutate]mutate(). n() gives the current group size. cur_group() gives the group keys, a tibble with one row and one column for each grouping variable. cur_group_id() gives a unique numeric identifier for the current group. cur_group_rows() gives the row indices for the current group. cur_column() gives the name of the current column (in [=across]across() only). See [=group_data]group_data() for equivalent functions that return values for all groups. See [=pick]pick() for a way to select a subset of columns using tidyselect syntax while inside summarise() or mutate().

Aliases
contextncur_groupcur_group_idcur_group_rowscur_column
Usage
n() cur_group() cur_group_id() cur_group_rows() cur_column()
Examples
df <- tibble( g = sample(rep(letters[1:3], 1:3)), x = runif(6), y = runif(6) ) gf <- df |> group_by(g) gf |> summarise(n = n()) gf |> mutate(id = cur_group_id()) gf |> reframe(row = cur_group_rows()) gf |> summarise(data = list(cur_group())) gf |> mutate(across(everything(), ~ paste(cur_column(), round(.x, 2))))
Custom sections
data.table
If you're familiar with data.table: cur_group_id() <-> .GRP cur_group() <-> .BY cur_group_rows() <-> .I See [=pick]pick() for an equivalent to .SD.
copy_to
Copy a local data frame to a remote src
CRAN · 1.2.1 · dplyr/man/copy_to.Rd · 2026-05-07

This function uploads a local data frame into a remote data source, creating the table definition as needed. Wherever possible, the new object will be temporary, limited to the current connection to the source.

Aliases
copy_to
Usage
copy_to(dest, df, name = deparse(substitute(df)), overwrite = FALSE, ...)
Arguments
dest
remote data source
df
local data frame
name
name for new remote table.
overwrite
If TRUE, will overwrite an existing table with name name. If FALSE, will throw an error if name already exists.
...
other parameters passed to methods.
Value
a tbl object in the remote source
Examples
iris2 <- dbplyr::src_memdb() |> copy_to(iris, overwrite = TRUE) iris2
See also
[=collect]collect() for the opposite action; downloading remote data into a local dbl.
Custom sections
Methods
This function is a generic, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. The following methods are currently available in loaded packages: [stage=render,results=rd]dplyr:::methods_rd("copy_to").
count
Count the observations in each group
CRAN · 1.2.1 · dplyr/man/count.Rd · 2026-05-07

count() lets you quickly count the unique values of one or more variables: df |> count(a, b) is roughly equivalent to df |> group_by(a, b) |> summarise(n = n()). count() is paired with tally(), a lower-level helper that is equivalent to df |> summarise(n = n()). Supply wt to perform weighted counts, switching the summary from n = n() to n = sum(wt). add_count() and add_tally() are equivalents to count() and tally() but use mutate() instead of summarise() so that they add a new column with group-wise counts.

Aliases
countcount.data.frametallyadd_countadd_tally
Usage
count(x, ..., wt = NULL, sort = FALSE, name = NULL) countdata.frame( x, ..., wt = NULL, sort = FALSE, name = NULL, .drop = group_by_drop_default(x) ) tally(x, wt = NULL, sort = FALSE, name = NULL) add_count(x, ..., wt = NULL, sort = FALSE, name = NULL, .drop = deprecated()) add_tally(x, wt = NULL, sort = FALSE, name = NULL)
Arguments
x
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr).
...
<[rlang:args_data_masking]data-masking> Variables to group by.
wt
<[rlang:args_data_masking]data-masking> Frequency weights. Can be NULL or a variable: If NULL (the default), counts the number of rows in each group. If a variable, computes sum(wt) for each group.
sort
If TRUE, will show the largest groups at the top.
name
The name of the new column in the output. If omitted, it will default to n. If there's already a column called n, it will use nn. If there's a column called n and nn, it'll use nnn, and so on, adding ns until it gets a new name.
.drop
Handling of factor levels that don't appear in the data, passed on to [=group_by]group_by(). For count(): if FALSE will include counts for empty groups (i.e. for levels of factors that don't exist in the data). htmlhttps://lifecycle.r-lib.org/articles/stages.html#defunctlifecycle-defunct.svgoptions: alt='[Defunct]'[Defunct] For add_count(): defunct since it can't actually affect the output.
Value
An object of the same type as .data. count() and add_count() group transiently, so the output has the same groups as the input.
Examples
# count() is a convenient way to get a sense of the distribution of # values in a dataset starwars |> count(species) starwars |> count(species, sort = TRUE) starwars |> count(sex, gender, sort = TRUE) starwars |> count(birth_decade = round(birth_year, -1)) # use the `wt` argument to perform a weighted count. This is useful # when the data has already been aggregated once df <- tribble( ~name, ~gender, ~runs, "Max", "male", 10, "Sandra", "female", 1, "Susan", "female", 4 ) # counts rows: df |> count(gender) # counts runs: df |> count(gender, wt = runs) # When factors are involved, `.drop = FALSE` can be used to retain factor # levels that don't appear in the data df2 <- tibble( id = 1:5, type = factor(c("a", "c", "a", NA, "a"), levels = c("a", "b", "c")) ) df2 |> count(type) df2 |> count(type, .drop = FALSE) # Or, using `group_by()`: df2 |> group_by(type, .drop = FALSE) |> count() # tally() is a lower-level function that assumes you've done the grouping starwars |> tally() starwars |> group_by(species) |> tally() # both count() and tally() have add_ variants that work like # mutate() instead of summarise df |> add_count(gender, wt = runs) df |> add_tally(wt = runs)
cross_join
Cross join
CRAN · 1.2.1 · dplyr/man/cross_join.Rd · 2026-05-07

Cross joins match each row in x to every row in y, resulting in a data frame with nrow(x) * nrow(y) rows. Since cross joins result in all possible matches between x and y, they technically serve as the basis for all [=mutate-joins]mutating joins, which can generally be thought of as cross joins followed by a filter. In practice, a more specialized procedure is used for better performance.

Aliases
cross_join
Concepts
joins
Usage
cross_join(x, y, ..., copy = FALSE, suffix = c(".x", ".y"))
Arguments
x, y
A pair of data frames, data frame extensions (e.g. a tibble), or lazy data frames (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
...
Other parameters passed onto methods.
copy
If x and y are not from the same data source, and copy is TRUE, then y will be copied into the same src as x. This allows you to join tables across srcs, but it is a potentially expensive operation so you must opt into it.
suffix
If there are non-joined duplicate variables in x and y, these suffixes will be added to the output to disambiguate them. Should be a character vector of length 2.
Value
An object of the same type as x (including the same groups). The output has the following properties: There are nrow(x) * nrow(y) rows returned. Output columns include all columns from both x and y. Column name collisions are resolved using suffix. The order of the rows and columns of x is preserved as much as possible.
Examples
# Cross joins match each row in `x` to every row in `y`. # Data within the columns is not used in the matching process. cross_join(band_instruments, band_members) # Control the suffix added to variables duplicated in # `x` and `y` with `suffix`. cross_join(band_instruments, band_members, suffix = c("", "_y"))
See also
Other joins: filter-joins, mutate-joins, nest_join()
Custom sections
Methods
This function is a generic, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. The following methods are currently available in loaded packages: [stage=render,results=rd]dplyr:::methods_rd("cross_join").
cumall
Cumulative versions of any, all, and mean
CRAN · 1.2.1 · dplyr/man/cumall.Rd · 2026-05-07

dplyr provides cumall(), cumany(), and cummean() to complete R's set of cumulative functions.

Aliases
cumallcumanycummean
Usage
cumall(x) cumany(x) cummean(x)
Arguments
x
For cumall() and cumany(), a logical vector; for cummean() an integer or numeric vector.
Value
A vector the same length as x.
Examples
# `cummean()` returns a numeric/integer vector of the same length # as the input vector. x <- c(1, 3, 5, 2, 2) cummean(x) cumsum(x) / seq_along(x) # `cumall()` and `cumany()` return logicals cumall(x < 5) cumany(x == 3) # `cumall()` vs. `cumany()` df <- data.frame( date = as.Date("2020-01-01") + 0:6, balance = c(100, 50, 25, -25, -50, 30, 120) ) # all rows after first overdraft df |> filter(cumany(balance < 0)) # all rows until first overdraft df |> filter(cumall(!(balance < 0)))
Custom sections
Cumulative logical functions
These are particularly useful in conjunction with filter(): cumall(x): all cases until the first FALSE. cumall(!x): all cases until the first TRUE. cumany(x): all cases after the first TRUE. cumany(!x): all cases after the first FALSE.
defunct
Defunct functions
CRAN · 1.2.1 · dplyr/man/defunct.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#defunctlifecycle-defunct.svgoptions: alt='[Defunct]'[Defunct] These functions were deprecated for at least two years before being made defunct. If there's a known replacement, calling the function will tell you about it.

Aliases
defunctcombinesrc_mysqlsrc_postgressrc_sqlitesrc_localsrc_dftbl_dfas.tbladd_rownames
Keywords
internal
Usage
# Deprecated in 1.0.0 ------------------------------------- combine(...) src_mysql( dbname, host = NULL, port = 0L, username = "root", password = "", ... ) src_postgres( dbname = NULL, host = NULL, port = NULL, user = NULL, password = NULL, ... ) src_sqlite(path, create = FALSE) src_local(tbl, pkg = NULL, env = NULL) src_df(pkg = NULL, env = NULL) tbl_df(data) as.tbl(x, ...) add_rownames(df, var = "rowname")
defunct-each
Defunct functions for working with multiple columns
CRAN · 1.2.1 · dplyr/man/defunct-each.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#defunctlifecycle-defunct.svgoptions: alt='[Defunct]'[Defunct] mutate_each() and summarise_each() are deprecated in favour of the new [=across]across() function that works within summarise() and mutate().

Aliases
defunct-eachsummarise_eachsummarise_each_mutate_eachmutate_each_summarize_eachsummarize_each_
Keywords
internal
Usage
summarise_each(tbl, funs, ...) summarise_each_(tbl, funs, vars) mutate_each(tbl, funs, ...) mutate_each_(tbl, funs, vars) summarize_each(tbl, funs, ...) summarize_each_(tbl, funs, vars)
defunct-lazyeval
Defunct standard evaluation functions
CRAN · 1.2.1 · dplyr/man/defunct-lazyeval.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#defunctlifecycle-defunct.svgoptions: alt='[Defunct]'[Defunct] dplyr used to offer twin versions of each verb suffixed with an underscore. These versions had standard evaluation (SE) semantics: rather than taking arguments by code, like NSE verbs, they took arguments by value. Their purpose was to make it possible to program with dplyr. However, dplyr now uses tidy evaluation semantics. NSE verbs still capture their arguments, but you can now unquote parts of these arguments. This offers full programmability with NSE verbs. Thus, the underscored versions are now superfluous. Unquoting triggers immediate evaluation of its operand and inlines the result within the captured expression. This result can be a value or an expression to be evaluated later with the rest of the argument. See vignette("programming") for more information.

Aliases
defunct-lazyevaladd_count_add_tally_arrange_count_distinct_do_filter_funs_group_by_group_indices_mutate_tally_transmute_rename_select_slice_summarise_summarize_
Keywords
internal
Usage
add_count_(x, vars, wt = NULL, sort = FALSE) add_tally_(x, wt, sort = FALSE) arrange_(.data, ..., .dots = list()) count_(x, vars, wt = NULL, sort = FALSE, .drop = group_by_drop_default(x)) distinct_(.data, ..., .dots, .keep_all = FALSE) do_(.data, ..., .dots = list()) filter_(.data, ..., .dots = list()) funs_(dots, args = list(), env = base_env()) group_by_(.data, ..., .dots = list(), add = FALSE) group_indices_(.data, ..., .dots = list()) mutate_(.data, ..., .dots = list()) tally_(x, wt, sort = FALSE) transmute_(.data, ..., .dots = list()) rename_(.data, ..., .dots = list()) select_(.data, ..., .dots = list()) slice_(.data, ..., .dots = list()) summarise_(.data, ..., .dots = list()) summarize_(.data, ..., .dots = list())
deprec-context
Information about the "current" group or variable
CRAN · 1.2.1 · dplyr/man/deprec-context.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#deprecatedlifecycle-deprecated.svgoptions: alt='[Deprecated]'[Deprecated] These functions were deprecated in dplyr 1.1.0. cur_data() is deprecated in favor of [=pick]pick(). cur_data_all() is deprecated but does not have a direct replacement as selecting the grouping variables is not well-defined and is unlikely to ever be useful.

Aliases
deprec-contextcur_datacur_data_all
Keywords
internal
Usage
cur_data() cur_data_all()
desc
Descending order
CRAN · 1.2.1 · dplyr/man/desc.Rd · 2026-05-07

Transform a vector into a format that will be sorted in descending order. This is useful within [=arrange]arrange().

Aliases
desc
Usage
desc(x)
Arguments
x
vector to transform
Examples
desc(1:10) desc(factor(letters)) first_day <- seq(as.Date("1910/1/1"), as.Date("1920/1/1"), "years") desc(first_day) starwars |> arrange(desc(mass))
dim_desc
Describing dimensions
CRAN · 1.2.1 · dplyr/man/dim_desc.Rd · 2026-05-07

Prints the dimensions of an array-like object in a user-friendly manner, substituting NA with ?? (for SQL queries).

Aliases
dim_desc
Keywords
internal
Usage
dim_desc(x)
Arguments
x
Object to show dimensions for.
Examples
dim_desc(mtcars)
distinct
Keep distinct/unique rows
CRAN · 1.2.1 · dplyr/man/distinct.Rd · 2026-05-07

Keep only unique/distinct rows from a data frame. This is similar to [=unique.data.frame]unique.data.frame() but considerably faster.

Aliases
distinct
Usage
distinct(.data, ..., .keep_all = FALSE)
Arguments
.data
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
...
<[rlang:args_data_masking]data-masking> Optional variables to use when determining uniqueness. If there are multiple rows for a given combination of inputs, only the first row will be preserved. If omitted, will use all variables in the data frame.
.keep_all
If TRUE, keep all variables in .data. If a combination of ... is not distinct, this keeps the first row of values.
Value
An object of the same type as .data. The output has the following properties: Rows are a subset of the input but appear in the same order. Columns are not modified if ... is empty or .keep_all is TRUE. Otherwise, distinct() first calls mutate() to create new columns. Groups are not modified. Data frame attributes are preserved.
Examples
df <- tibble( x = sample(10, 100, rep = TRUE), y = sample(10, 100, rep = TRUE) ) nrow(df) nrow(distinct(df)) nrow(distinct(df, x, y)) distinct(df, x) distinct(df, y) # You can choose to keep all other variables as well distinct(df, x, .keep_all = TRUE) distinct(df, y, .keep_all = TRUE) # You can also use distinct on computed variables distinct(df, diff = abs(x - y)) # Use `pick()` to select columns with tidy-select distinct(starwars, pick(contains("color"))) # Grouping ------------------------------------------------- df <- tibble( g = c(1, 1, 2, 2, 2), x = c(1, 1, 2, 1, 2), y = c(3, 2, 1, 3, 1) ) df <- df |> group_by(g) # With grouped data frames, distinctness is computed within each group df |> distinct(x) # When `...` are omitted, `distinct()` still computes distinctness using # all variables in the data frame df |> distinct()
Custom sections
Methods
This function is a generic, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. The following methods are currently available in loaded packages: [stage=render,results=rd]dplyr:::methods_rd("distinct").
distinct_all
Select distinct rows by a selection of variables
CRAN · 1.2.1 · dplyr/man/distinct_all.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#supersededlifecycle-superseded.svgoptions: alt='[Superseded]'[Superseded] Scoped verbs (_if, _at, _all) have been superseded by the use of [=pick]pick() or [=across]across() in an existing verb. See vignette("colwise") for details. These scoped variants of [=distinct]distinct() extract distinct rows by a selection of variables. Like distinct(), you can modify the variables before ordering with the .funs argument.

Aliases
distinct_alldistinct_atdistinct_if
Keywords
internal
Usage
distinct_all(.tbl, .funs = list(), ..., .keep_all = FALSE) distinct_at(.tbl, .vars, .funs = list(), ..., .keep_all = FALSE) distinct_if(.tbl, .predicate, .funs = list(), ..., .keep_all = FALSE)
Arguments
.tbl
A tbl object.
.funs
A function fun, a quosure style lambda ~ fun(.) or a list of either form.
...
Additional arguments for the function calls in .funs. These are evaluated only once, with [rlang:dyn-dots]tidy dots support.
.keep_all
If TRUE, keep all variables in .data. If a combination of ... is not distinct, this keeps the first row of values.
.vars
A list of columns generated by [=vars]vars(), a character vector of column names, a numeric vector of column positions, or NULL.
.predicate
A predicate function to be applied to the columns or a logical vector. The variables for which .predicate is or returns TRUE are selected. This argument is passed to [rlang:as_function]rlang::as_function() and thus supports quosure-style lambda functions and strings representing function names.
Examples
df <- tibble(x = rep(2:5, each = 2) / 2, y = rep(2:3, each = 4) / 2) distinct_all(df) # -> distinct(df, pick(everything())) distinct_at(df, vars(x,y)) # -> distinct(df, pick(x, y)) distinct_if(df, is.numeric) # -> distinct(df, pick(where(is.numeric))) # You can supply a function that will be applied before extracting the distinct values # The variables of the sorted tibble keep their original values. distinct_all(df, round) # -> distinct(df, across(everything(), round))
Custom sections
Grouping variables
The grouping variables that are part of the selection are taken into account to determine distinct rows.
distinct_prepare
Prepare for grouping and other operations
CRAN · 1.2.1 · dplyr/man/group_by_prepare.Rd · 2026-05-07

*_prepare() performs standard manipulation that is needed prior to actual data processing. They are only be needed by packages that implement dplyr backends.

Aliases
distinct_preparegroup_by_prepare
Keywords
internal
Usage
distinct_prepare( .data, vars, group_vars = character(), .keep_all = FALSE, caller_env = caller_env(2), error_call = caller_env() ) group_by_prepare( .data, ..., .add = FALSE, .dots = deprecated(), add = deprecated(), error_call = caller_env() )
Value
A list dataModified tbl groupsModified groups
do
Do anything
CRAN · 1.2.1 · dplyr/man/do.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#supersededlifecycle-superseded.svgoptions: alt='[Superseded]'[Superseded] do() is superseded as of dplyr 1.0.0, because its syntax never really felt like it belonged with the rest of dplyr. It's replaced by a combination of [=reframe]reframe() (which can produce multiple rows and multiple columns), [=nest_by]nest_by() (which creates a rowwise tibble of nested data), and [=pick]pick() (which allows you to access the data for the "current" group).

Aliases
do
Keywords
internal
Usage
do(.data, ...)
Arguments
.data
a tbl
...
Expressions to apply to each group. If named, results will be stored in a new column. If unnamed, must return a data frame. You can use . to refer to the current group. You can not mix named and unnamed arguments.
Examples
# do() with unnamed arguments becomes reframe() or summarise() # . becomes pick() by_cyl <- mtcars |> group_by(cyl) by_cyl |> do(head(., 2)) # -> by_cyl |> reframe(head(pick(everything()), 2)) by_cyl |> slice_head(n = 2) # Can refer to variables directly by_cyl |> do(mean = mean(.$vs)) # -> by_cyl |> summarise(mean = mean(vs)) # do() with named arguments becomes nest_by() + mutate() & list() models <- by_cyl |> do(mod = lm(mpg ~ disp, data = .)) # -> models <- mtcars |> nest_by(cyl) |> mutate(mod = list(lm(mpg ~ disp, data = data))) models |> summarise(rsq = summary(mod)$r.squared) # use broom to turn models into data models |> do(data.frame( var = names(coef(.$mod)), coef(summary(.$mod))) ) if (requireNamespace("broom", quietly = TRUE)) withAutoprint(\ # examplesIf # -> models |> reframe(broom::tidy(mod)) \) # examplesIf
dplyr-locale
Locale used by arrange()
CRAN · 1.2.1 · dplyr/man/dplyr-locale.Rd · 2026-05-07

This page documents details about the locale used by [=arrange]arrange() when ordering character vectors. Default locale The default locale used by arrange() is the C locale. This is used when .locale = NULL unless the deprecated dplyr.legacy_locale global option is set to TRUE. You can also force the C locale to be used unconditionally with .locale = "C". The C locale is not exactly the same as English locales, such as "en". The main difference is that the C locale groups the English alphabet by case, while most English locales group the alphabet by letter. For example, c("a", "b", "C", "B", "c") will sort as c("B", "C", "a", "b", "c") in the C locale, with all uppercase letters coming before lowercase letters, but will sort as c("a", "b", "B", "c", "C") in an English locale. This often makes little practical difference during data analysis, because both return identical results when case is consistent between observations. Reproducibility The C locale has the benefit of being completely reproducible across all supported R versions and operating systems with no extra effort. If you set .locale to an option from [stringi:stri_locale_list]stringi::stri_locale_list(), then stringi must be installed by anyone who wants to run your code. If you utilize this in a package, then stringi should be placed in Imports. Legacy behavior htmlhttps://lifecycle.r-lib.org/articles/stages.html#deprecatedlifecycle-deprecated.svgoptions: alt='[Deprecated]'[Deprecated] Prior to dplyr 1.1.0, character columns were ordered in the system locale. Setting the global option dplyr.legacy_locale to TRUE retains this legacy behavior, but this has been deprecated. Update existing code to explicitly call arrange(.locale = ) instead. Run Sys.getlocale("LC_COLLATE") to determine your system locale, and compare that against the list in [stringi:stri_locale_list]stringi::stri_locale_list() to find an appropriate value for .locale, i.e. for American English, "en_US". Setting .locale directly will override any usage of dplyr.legacy_locale.

Aliases
dplyr-locale
Keywords
internal
Examples
if (dplyr:::has_minimum_stringi()) withAutoprint(\ # examplesIf df <- tibble(x = c("a", "b", "C", "B", "c")) df # Default locale is C, which groups the English alphabet by case, placing # uppercase letters before lowercase letters. arrange(df, x) # The American English locale groups the alphabet by letter. # Explicitly override `.locale` with `"en"` for this ordering. arrange(df, x, .locale = "en") # This Danish letter is expected to sort after `z` df <- tibble(x = c("o", "p", "00F8", "z")) df # The American English locale sorts it right after `o` arrange(df, x, .locale = "en") # Using `"da"` for Danish ordering gives the expected result arrange(df, x, .locale = "da") \) # examplesIf
dplyr-package
dplyr: A Grammar of Data Manipulation
CRAN · 1.2.1 · package · dplyr/man/dplyr-package.Rd · 2026-05-07

To learn more about dplyr, start with the vignettes: browseVignettes(package = "dplyr")

Aliases
dplyrdplyr-package
Keywords
internal
See also
Useful links: https://dplyr.tidyverse.org https://github.com/tidyverse/dplyr Report bugs at https://github.com/tidyverse/dplyr/issues
Author
Maintainer: Hadley Wickham hadley@posit.co (https://orcid.org/0000-0003-4757-117XORCID) Authors: Romain François (https://orcid.org/0000-0002-2444-4226ORCID) Lionel Henry Kirill Müller (https://orcid.org/0000-0002-1416-3412ORCID) Davis Vaughan davis@posit.co (https://orcid.org/0000-0003-4777-038XORCID) Other contributors: Posit Software, PBC [copyright holder, funder]
dplyr_by
Per-operation grouping with .by/by
CRAN · 1.2.1 · dplyr/man/dplyr_by.Rd · 2026-05-07

There are two ways to group in dplyr: Persistent grouping with [=group_by]group_by() Per-operation grouping with .by/by This help page is dedicated to explaining where and why you might want to use the latter. Depending on the dplyr verb, the per-operation grouping argument may be named .by or by. The Supported verbs section below outlines this on a case-by-case basis. The remainder of this page will refer to .by for simplicity. Grouping radically affects the computation of the dplyr verb you use it with, and one of the goals of .by is to allow you to place that grouping specification alongside the code that actually uses it. As an added benefit, with .by you no longer need to remember to [=ungroup]ungroup() after [=summarise]summarise(), and summarise() won't ever message you about how it's handling the groups! This idea comes from https://CRAN.R-project.org/package=data.tabledata.table, which allows you to specify by alongside modifications in j, like: dt[, .(x = mean(x)), by = g]. Supported verbs [=mutate]mutate(.by = ) [=summarise]summarise(.by = ) [=reframe]reframe(.by = ) [=filter]filter(.by = ) [=filter_out]filter_out(.by = ) [=slice]slice(.by = ) [=slice_head]slice_head(by = ) and [=slice_tail]slice_tail(by = ) [=slice_min]slice_min(by = ) and [=slice_max]slice_max(by = ) [=slice_sample]slice_sample(by = ) Note that some dplyr verbs use by while others use .by. This is a purely technical difference. Differences between .by and group_by()ll .by group_by() Grouping only affects a single verb Grouping is persistent across multiple verbs Selects variables with [=dplyr_tidy_select]tidy-select Computes expressions with [rlang:args_data_masking]data-masking Summaries use existing order of group keys Summaries sort group keys in ascending order Using .by Let's take a look at the two grouping approaches using this expenses data set, which tracks costs accumulated across various ids and regions: html<div class="sourceCode r">expenses <- tibble( id = c(1, 2, 1, 3, 1, 2, 3), region = c("A", "A", "A", "B", "B", "A", "A"), cost = c(25, 20, 19, 12, 9, 6, 6) ) expenses #> # A tibble: 7 x 3 #> id region cost #> <dbl> <chr> <dbl> #> 1 1 A 25 #> 2 2 A 20 #> 3 1 A 19 #> 4 3 B 12 #> 5 1 B 9 #> 6 2 A 6 #> 7 3 A 6 html</div> Imagine that you wanted to compute the average cost per region. You'd probably write something like this: html<div class="sourceCode r">expenses |> group_by(region) |> summarise(cost = mean(cost)) #> # A tibble: 2 x 2 #> region cost #> <chr> <dbl> #> 1 A 15.2 #> 2 B 10.5 html</div> Instead, you can now specify the grouping inline within the verb: html<div class="sourceCode r">expenses |> summarise(cost = mean(cost), .by = region) #> # A tibble: 2 x 2 #> region cost #> <chr> <dbl> #> 1 A 15.2 #> 2 B 10.5 html</div> .by applies to a single operation, meaning that since expenses was an ungrouped data frame, the result after applying .by will also always be an ungrouped data frame, regardless of the number of grouping columns. html<div class="sourceCode r">expenses |> summarise(cost = mean(cost), .by = c(id, region)) #> # A tibble: 5 x 3 #> id region cost #> <dbl> <chr> <dbl> #> 1 1 A 22 #> 2 2 A 13 #> 3 3 B 12 #> 4 1 B 9 #> 5 3 A 6 html</div> Compare that with group_by() |> summarise(), where summarise() generally peels off 1 layer of grouping by default, typically with a message that it is doing so: html<div class="sourceCode r">expenses |> group_by(id, region) |> summarise(cost = mean(cost)) #> `summarise()` has regrouped the output. #> i Summaries were computed grouped by id and region. #> i Output is grouped by id. #> i Use `summarise(.groups = "drop_last")` to silence this message. #> i Use `summarise(.by = c(id, region))` for per-operation grouping #> (`?dplyr::dplyr_by`) instead. #> # A tibble: 5 x 3 #> # Groups: id [3] #> id region cost #> <dbl> <chr> <dbl> #> 1 1 A 22 #> 2 1 B 9 #> 3 2 A 13 #> 4 3 A 6 #> 5 3 B 12 html</div> Because .by grouping applies to a single operation, you don't need to worry about ungrouping, and it never needs to emit a message to remind you what it is doing with the groups. Note that with .by we specified multiple columns to group by using the [=dplyr_tidy_select]tidy-select syntax c(id, region). If you have a character vector of column names you'd like to group by, you can do so with .by = all_of(my_cols). It will group by the columns in the order they were provided. To prevent surprising results, you can't use .by on an existing grouped data frame: html<div class="sourceCode r">expenses |> group_by(id) |> summarise(cost = mean(cost), .by = c(id, region)) #> Error in `summarise()`: #> ! Can't supply `.by` when `.data` is a grouped data frame. html</div> So far we've focused on the usage of .by with summarise(), but .by works with a number of other dplyr verbs. For example, you could append the mean cost per region onto the original data frame as a new column rather than computing a summary: html<div class="sourceCode r">expenses |> mutate(cost_by_region = mean(cost), .by = region) #> # A tibble: 7 x 4 #> id region cost cost_by_region #> <dbl> <chr> <dbl> <dbl> #> 1 1 A 25 15.2 #> 2 2 A 20 15.2 #> 3 1 A 19 15.2 #> 4 3 B 12 10.5 #> 5 1 B 9 10.5 #> 6 2 A 6 15.2 #> 7 3 A 6 15.2 html</div> Or you could slice out the maximum cost per combination of id and region: html<div class="sourceCode r"># Note that the argument is named `by` in `slice_max()` expenses |> slice_max(cost, n = 1, by = c(id, region)) #> # A tibble: 5 x 3 #> id region cost #> <dbl> <chr> <dbl> #> 1 1 A 25 #> 2 2 A 20 #> 3 3 B 12 #> 4 1 B 9 #> 5 3 A 6 html</div> Result ordering When used with .by, summarise(), reframe(), and slice() all maintain the ordering of the existing data. This is different from group_by(), which has always sorted the group keys in ascending order. html<div class="sourceCode r">df <- tibble( month = c("jan", "jan", "feb", "feb", "mar"), temp = c(20, 25, 18, 20, 40) ) # Uses ordering by "first appearance" in the original data df |> summarise(average_temp = mean(temp), .by = month) #> # A tibble: 3 x 2 #> month average_temp #> <chr> <dbl> #> 1 jan 22.5 #> 2 feb 19 #> 3 mar 40 # Sorts in ascending order df |> group_by(month) |> summarise(average_temp = mean(temp)) #> # A tibble: 3 x 2 #> month average_temp #> <chr> <dbl> #> 1 feb 19 #> 2 jan 22.5 #> 3 mar 40 html</div> If you need sorted group keys, we recommend that you explicitly use [=arrange]arrange() either before or after the call to summarise(), reframe(), or slice(). This also gives you full access to all of arrange()'s features, such as desc() and the .locale argument. Verbs without .by support If a dplyr verb doesn't support .by, then that typically means that the verb isn't inherently affected by grouping. For example, [=pull]pull() and [=rename]rename() don't support .by, because specifying columns to group by would not affect their implementations. That said, there are a few exceptions to this where sometimes a dplyr verb doesn't support .by, but does have special support for grouped data frames created by [=group_by]group_by(). This is typically because the verbs are required to retain the grouping columns, for example: [=select]select() always retains grouping columns, with a message if any aren't specified in the select() call. [=distinct]distinct() and [=count]count() place unspecified grouping columns at the front of the data frame before computing their results. [=arrange]arrange() has a .by_group argument to optionally order by grouping columns first. If group_by() didn't exist, then these verbs would not have special support for grouped data frames.

Aliases
dplyr_by
dplyr_data_masking
Data-masking
CRAN · 1.2.1 · dplyr/man/dplyr_data_masking.Rd · 2026-05-07

This page is now located at [rlang:args_data_masking]?rlang::args_data_masking.

Aliases
dplyr_data_masking
Keywords
internal
dplyr_extending
Extending dplyr with new data frame subclasses
CRAN · 1.2.1 · dplyr/man/dplyr_extending.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#experimentallifecycle-experimental.svgoptions: alt='[Experimental]'[Experimental] These three functions, along with names<- and 1d numeric [ (i.e. x[loc]) methods, provide a minimal interface for extending dplyr to work with new data frame subclasses. This means that for simple cases you should only need to provide a couple of methods, rather than a method for every dplyr verb. These functions are a stop-gap measure until we figure out how to solve the problem more generally, but it's likely that any code you write to implement them will find a home in what comes next.

Aliases
dplyr_extendingdplyr_row_slicedplyr_col_modifydplyr_reconstruct
Keywords
internal
Usage
dplyr_row_slice(data, i, ...) dplyr_col_modify(data, cols) dplyr_reconstruct(data, template)
Arguments
data
A tibble. We use tibbles because they avoid some inconsistent subset-assignment use cases.
i
A numeric or logical vector that indexes the rows of data.
cols
A named list used to modify columns. A NULL value should remove an existing column.
template
Template data frame to use for restoring attributes.
Custom sections
Basic advice
This section gives you basic advice if you want to extend dplyr to work with your custom data frame subclass, and you want the dplyr methods to behave in basically the same way. If you have data frame attributes that don't depend on the rows or columns (and should unconditionally be preserved), you don't need to do anything. The one exception to this is if your subclass extends a data.frame directly rather than extending a tibble. The [.data.frame method does not preserve attributes, so you'll need to write a [ method for your subclass that preserves attributes important for your class. If you have scalar attributes that depend on rows, implement a dplyr_reconstruct() method. Your method should recompute the attribute depending on rows now present. If you have scalar attributes that depend on columns, implement a dplyr_reconstruct() method and a 1d [ method. For example, if your class requires that certain columns be present, your method should return a data.frame or tibble when those columns are removed. If your attributes are vectorised over rows, implement a dplyr_row_slice() method. This gives you access to i so you can modify the row attribute accordingly. You'll also need to think carefully about how to recompute the attribute in dplyr_reconstruct(), and you will need to carefully verify the behaviour of each verb, and provide additional methods as needed. If your attributes that are vectorised over columns, implement dplyr_col_modify(), 1d [, and names<- methods. All of these methods know which columns are being modified, so you can update the column attribute according. You'll also need to think carefully about how to recompute the attribute in dplyr_reconstruct(), and you will need to carefully verify the behaviour of each verb, and provide additional methods as needed.
Current usage
arrange(), filter() (and filter_out()), slice() (and the rest of the slice_*() family), semi_join(), and anti_join() work by generating a vector of row indices, and then subsetting with dplyr_row_slice(). mutate() generates a list of new column value (using NULL to indicate when columns should be deleted), then passes that to dplyr_col_modify(). It also uses 1d [ to implement .keep, and will call relocate() if either .before or .after are supplied. summarise() and reframe() work similarly to mutate() but the data modified by dplyr_col_modify() comes from group_data() or is built from .by. Note that this means that the data frames returned by summarise() and reframe() are fundamentally new data frames, and will not retain any custom subclasses or attributes. select() uses 1d [ to select columns, then names<- to rename them. rename() just uses names<-. relocate() just uses 1d [. inner_join(), left_join(), right_join(), and full_join() coerce x to a tibble, modify the rows, then use dplyr_reconstruct() to convert back to the same type as x. nest_join() converts both x and y to tibbles, modifies the rows, and uses dplyr_col_modify() to handle modified key variables and the list-column that y becomes. It also uses dplyr_reconstruct() to convert the outer result back to the type of x, and to convert the nested tibbles back to the type of y. distinct() does a mutate() if any expressions are present, then uses 1d [ to select variables to keep, then dplyr_row_slice() to select distinct rows. Note that group_by() and ungroup() don't use any of these generics and you'll need to provide methods for them directly, or rely on .by for per-operation grouping.
dplyr_tidy_select
Argument type: tidy-select
CRAN · 1.2.1 · dplyr/man/dplyr_tidy_select.Rd · 2026-05-07

This page describes the <tidy-select> argument modifier which indicates the argument supports tidy selections. Tidy selection provides a concise dialect of R for selecting variables based on their names or properties. Tidy selection is a variant of tidy evaluation. This means that inside functions, tidy-select arguments require special attention, as described in the Indirection section below. If you've never heard of tidy evaluation before, start with vignette("programming").

Aliases
dplyr_tidy_select
Keywords
internal
Custom sections
Overview of selection features
Tidyverse selections implement a dialect of R where operators make it easy to select variables: : for selecting a range of consecutive variables. ! for taking the complement of a set of variables. & and | for selecting the intersection or the union of two sets of variables. c() for combining selections. In addition, you can use selection helpers. Some helpers select specific columns: [tidyselect:everything]everything(): Matches all variables. [tidyselect:everything]last_col(): Select last variable, possibly with an offset. [=group_cols]group_cols(): Select all grouping columns. Other helpers select variables by matching patterns in their names: [tidyselect:starts_with]starts_with(): Starts with a prefix. [tidyselect:starts_with]ends_with(): Ends with a suffix. [tidyselect:starts_with]contains(): Contains a literal string. [tidyselect:starts_with]matches(): Matches a regular expression. [tidyselect:starts_with]num_range(): Matches a numerical range like x01, x02, x03. Or from variables stored in a character vector: [tidyselect:all_of]all_of(): Matches variable names in a character vector. All names must be present, otherwise an out-of-bounds error is thrown. [tidyselect:all_of]any_of(): Same as all_of(), except that no error is thrown for names that don't exist. Or using a predicate function: [tidyselect:where]where(): Applies a function to all variables and selects those for which the function returns TRUE.
Indirection
There are two main cases: If you have a character vector of column names, use all_of() or any_of(), depending on whether or not you want unknown variable names to cause an error, e.g. select(df, all_of(vars)), select(df, !any_of(vars)). If you want the user to be able to supply a tidyselect specification in a function argument, embrace the function argument, e.g. select(df, vars ).
explain
Explain details of a tbl
CRAN · 1.2.1 · dplyr/man/explain.Rd · 2026-05-07

This is a generic function which gives more details about an object than [=print]print(), and is more focused on human readable output than [=str]str().

Aliases
explainshow_query
Usage
explain(x, ...) show_query(x, ...)
Arguments
x
An object to explain
...
Other parameters possibly used by generic
Value
The first argument, invisibly.
Examples
if (requireNamespace("dbplyr", quietly = TRUE) && requireNamespace("RSQLite", quietly = TRUE)) withAutoprint(\ # examplesIf lahman_s <- dbplyr::lahman_sqlite() batting <- tbl(lahman_s, "Batting") batting |> show_query() batting |> explain() # The batting database has indices on all ID variables: # SQLite automatically picks the most restrictive index batting |> filter(lgID == "NL" & yearID == 2000L) |> explain() # OR's will use multiple indexes batting |> filter(lgID == "NL" | yearID == 2000) |> explain() # Joins will use indexes in both tables teams <- tbl(lahman_s, "Teams") batting |> left_join(teams, c("yearID", "teamID")) |> explain() \) # examplesIf
Custom sections
Databases
Explaining a tbl_sql will run the SQL EXPLAIN command which will describe the query plan. This requires a little bit of knowledge about how EXPLAIN works for your database, but is very useful for diagnosing performance problems.
filter
Keep or drop rows that match a condition
CRAN · 1.2.1 · dplyr/man/filter.Rd · 2026-05-07

These functions are used to subset a data frame, applying the expressions in ... to determine which rows should be kept (for filter()) or dropped ( for filter_out()). Multiple conditions can be supplied separated by a comma. These will be combined with the & operator. To combine comma separated conditions using | instead, wrap them in [=when_any]when_any(). Both filter() and filter_out() treat NA like FALSE. This subtle behavior can impact how you write your conditions when missing values are involved. See the section on Missing values for important details and examples.

Aliases
filterfilter_out
Concepts
single table verbs
Usage
filter(.data, ..., .by = NULL, .preserve = FALSE) filter_out(.data, ..., .by = NULL, .preserve = FALSE)
Arguments
.data
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
...
<[rlang:args_data_masking]data-masking> Expressions that return a logical vector, defined in terms of the variables in .data. If multiple expressions are included, they are combined with the & operator. To combine expressions using | instead, wrap them in [=when_any]when_any(). Only rows for which all expressions evaluate to TRUE are kept (for filter()) or dropped (for filter_out()).
.by
<[=dplyr_tidy_select]tidy-select> Optionally, a selection of columns to group by for just this operation, functioning as an alternative to [=group_by]group_by(). For details and examples, see [=dplyr_by]?dplyr_by.
.preserve
Relevant when the .data input is grouped. If .preserve = FALSE (the default), the grouping structure is recalculated based on the resulting data, otherwise the grouping is kept as is.
Value
An object of the same type as .data. The output has the following properties: Rows are a subset of the input, but appear in the same order. Columns are not modified. The number of groups may be reduced (if .preserve is not TRUE). Data frame attributes are preserved.
Examples
# Filtering for one criterion filter(starwars, species == "Human") # Filtering for multiple criteria within a single logical expression filter(starwars, hair_color == "none" & eye_color == "black") filter(starwars, hair_color == "none" | eye_color == "black") # Multiple comma separated expressions are combined using `&` starwars |> filter(hair_color == "none", eye_color == "black") # To combine comma separated expressions using `|` instead, use `when_any()` starwars |> filter(when_any(hair_color == "none", eye_color == "black")) # Filtering out to drop rows filter_out(starwars, hair_color == "none") # When filtering out, it can be useful to first interactively filter for the # rows you want to drop, just to double check that you've written the # conditions correctly. Then, just change `filter()` to `filter_out()`. filter(starwars, mass > 1000, eye_color == "orange") filter_out(starwars, mass > 1000, eye_color == "orange") # The filtering operation may yield different results on grouped # tibbles because the expressions are computed within groups. # # The following keeps rows where `mass` is greater than the # global average: starwars |> filter(mass > mean(mass, na.rm = TRUE)) # Whereas this keeps rows with `mass` greater than the per `gender` # average: starwars |> filter(mass > mean(mass, na.rm = TRUE), .by = gender) # If you find yourself trying to use a `filter()` to drop rows, then # you should consider if switching to `filter_out()` can simplify your # conditions. For example, to drop blond individuals, you might try: starwars |> filter(hair_color != "blond") # But this also drops rows with an `NA` hair color! To retain those: starwars |> filter(hair_color != "blond" | is.na(hair_color)) # But explicit `NA` handling like this can quickly get unwieldy, especially # with multiple conditions. Since your intent was to specify rows to drop # rather than rows to keep, use `filter_out()`. This also removes the need # for any explicit `NA` handling. starwars |> filter_out(hair_color == "blond") # To refer to column names that are stored as strings, use the `.data` # pronoun: vars <- c("mass", "height") cond <- c(80, 150) starwars |> filter( .data[[vars[[1]]]] > cond[[1]], .data[[vars[[2]]]] > cond[[2]] ) # Learn more in ?rlang::args_data_masking
See also
Other single table verbs: arrange(), mutate(), reframe(), rename(), select(), slice(), summarise()
Custom sections
Missing values
Both filter() and filter_out() treat NA like FALSE. This results in the following behavior: filter() drops both NA and FALSE. filter_out() keeps both NA and FALSE. This means that filter(data, <conditions>) + filter_out(data, <conditions>) captures every row within data exactly once. The NA handling of these functions has been designed to match your intent. When your intent is to keep rows, use filter(). When your intent is to drop rows, use filter_out(). For example, if your goal with this cars data is to "drop rows where the class is suv", then you might write this in one of two ways: html<div class="sourceCode r">cars <- tibble(class = c("suv", NA, "coupe")) cars #> # A tibble: 3 x 1 #> class #> <chr> #> 1 suv #> 2 <NA> #> 3 coupe html</div> html<div class="sourceCode r">cars |> filter(class != "suv") #> # A tibble: 1 x 1 #> class #> <chr> #> 1 coupe html</div> html<div class="sourceCode r">cars |> filter_out(class == "suv") #> # A tibble: 2 x 1 #> class #> <chr> #> 1 <NA> #> 2 coupe html</div> Note how filter() drops the NA rows even though our goal was only to drop "suv" rows, but filter_out() matches our intuition. To generate the correct result with filter(), you'd need to use: html<div class="sourceCode r">cars |> filter(class != "suv" | is.na(class)) #> # A tibble: 2 x 1 #> class #> <chr> #> 1 <NA> #> 2 coupe html</div> This quickly gets unwieldy when multiple conditions are involved. In general, if you find yourself: Using "negative" operators like != or ! Adding in NA handling like | is.na(col) or & !is.na(col) then you should consider if swapping to the other filtering variant would make your conditions simpler. Comparison to base subsetting Base subsetting with [ doesn't treat NA like TRUE or FALSE. Instead, it generates a fully missing row, which is different from how both filter() and filter_out() work. html<div class="sourceCode r">cars <- tibble(class = c("suv", NA, "coupe"), mpg = c(10, 12, 14)) cars #> # A tibble: 3 x 2 #> class mpg #> <chr> <dbl> #> 1 suv 10 #> 2 <NA> 12 #> 3 coupe 14 html</div> html<div class="sourceCode r">cars[cars$class == "suv",] #> # A tibble: 2 x 2 #> class mpg #> <chr> <dbl> #> 1 suv 10 #> 2 <NA> NA cars |> filter(class == "suv") #> # A tibble: 1 x 2 #> class mpg #> <chr> <dbl> #> 1 suv 10 html</div>
Useful filter functions
There are many functions and operators that are useful when constructing the expressions used to filter the data: ==, >, >= etc &, |, !, [=xor]xor() [=is.na]is.na() [=between]between(), [=near]near() [=when_any]when_any(), [=when_all]when_all()
Grouped tibbles
Because filtering expressions are computed within groups, they may yield different results on grouped tibbles. This will be the case as soon as an aggregating, lagging, or ranking function is involved. Compare this ungrouped filtering: html<div class="sourceCode">starwars |> filter(mass > mean(mass, na.rm = TRUE)) html</div> With the grouped equivalent: html<div class="sourceCode">starwars |> filter(mass > mean(mass, na.rm = TRUE), .by = gender) html</div> In the ungrouped version, filter() compares the value of mass in each row to the global average (taken over the whole data set), keeping only the rows with mass greater than this global average. In contrast, the grouped version calculates the average mass separately for each gender group, and keeps rows with mass greater than the relevant within-gender average.
Methods
This function is a generic, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. The following methods are currently available in loaded packages: [stage=render,results=rd]dplyr:::methods_rd("filter").
filter-joins
Filtering joins
CRAN · 1.2.1 · dplyr/man/filter-joins.Rd · 2026-05-07

Filtering joins filter rows from x based on the presence or absence of matches in y: semi_join() returns all rows from x with a match in y. anti_join() returns all rows from x without a match in y.

Aliases
filter-joinssemi_joinsemi_join.data.frameanti_joinanti_join.data.frame
Concepts
joins
Usage
semi_join(x, y, by = NULL, copy = FALSE, ...) semi_joindata.frame(x, y, by = NULL, copy = FALSE, ..., na_matches = c("na", "never")) anti_join(x, y, by = NULL, copy = FALSE, ...) anti_joindata.frame(x, y, by = NULL, copy = FALSE, ..., na_matches = c("na", "never"))
Arguments
x, y
A pair of data frames, data frame extensions (e.g. a tibble), or lazy data frames (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
by
A join specification created with [=join_by]join_by(), or a character vector of variables to join by. If NULL, the default, *_join() will perform a natural join, using all variables in common across x and y. A message lists the variables so that you can check they're correct; suppress the message by supplying by explicitly. To join on different variables between x and y, use a [=join_by]join_by() specification. For example, join_by(a == b) will match x$a to y$b. To join by multiple variables, use a [=join_by]join_by() specification with multiple expressions. For example, join_by(a == b, c == d) will match x$a to y$b and x$c to y$d. If the column names are the same between x and y, you can shorten this by listing only the variable names, like join_by(a, c). [=join_by]join_by() can also be used to perform inequality, rolling, and overlap joins. See the documentation at [=join_by]?join_by for details on these types of joins. For simple equality joins, you can alternatively specify a character vector of variable names to join by. For example, by = c("a", "b") joins x$a to y$a and x$b to y$b. If variable names differ between x and y, use a named character vector like by = c("x_a" = "y_a", "x_b" = "y_b"). To perform a cross-join, generating all combinations of x and y, see [=cross_join]cross_join().
copy
If x and y are not from the same data source, and copy is TRUE, then y will be copied into the same src as x. This allows you to join tables across srcs, but it is a potentially expensive operation so you must opt into it.
...
Other parameters passed onto methods.
na_matches
Should two NA or two NaN values match? "na", the default, treats two NA or two NaN values as equal, like %in%, [=match]match(), and [=merge]merge(). "never" treats two NA or two NaN values as different, and will never match them together or to any other values. This is similar to joins for database sources and to base::merge(incomparables = NA).
Value
An object of the same type as x. The output has the following properties: Rows are a subset of the input, but appear in the same order. Columns are not modified. Data frame attributes are preserved. Groups are taken from x. The number of groups may be reduced.
Examples
# "Filtering" joins keep cases from the LHS band_members |> semi_join(band_instruments) band_members |> anti_join(band_instruments) # To suppress the message about joining variables, supply `by` band_members |> semi_join(band_instruments, by = join_by(name)) # This is good practice in production code
See also
Other joins: cross_join(), mutate-joins, nest_join()
Custom sections
Methods
These function are generics, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. Methods available in currently loaded packages: semi_join(): [stage=render,results=rd]dplyr:::methods_rd("semi_join"). anti_join(): [stage=render,results=rd]dplyr:::methods_rd("anti_join").
filter_all
Filter within a selection of variables
CRAN · 1.2.1 · dplyr/man/filter_all.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#supersededlifecycle-superseded.svgoptions: alt='[Superseded]'[Superseded] Scoped verbs (_if, _at, _all) have been superseded by the use of [=if_all]if_all() or [=if_any]if_any() in an existing verb. See vignette("colwise") for details. These scoped filtering verbs apply a predicate expression to a selection of variables. The predicate expression should be quoted with [=all_vars]all_vars() or [=any_vars]any_vars() and should mention the pronoun . to refer to variables.

Aliases
filter_allfilter_iffilter_at
Keywords
internal
Usage
filter_all(.tbl, .vars_predicate, .preserve = FALSE) filter_if(.tbl, .predicate, .vars_predicate, .preserve = FALSE) filter_at(.tbl, .vars, .vars_predicate, .preserve = FALSE)
Arguments
.tbl
A tbl object.
.vars_predicate
A quoted predicate expression as returned by [=all_vars]all_vars() or [=any_vars]any_vars(). Can also be a function or purrr-like formula. In this case, the intersection of the results is taken by default and there's currently no way to request the union.
.preserve
when FALSE (the default), the grouping structure is recalculated based on the resulting data, otherwise it is kept as is.
.predicate
A predicate function to be applied to the columns or a logical vector. The variables for which .predicate is or returns TRUE are selected. This argument is passed to [rlang:as_function]rlang::as_function() and thus supports quosure-style lambda functions and strings representing function names.
.vars
A list of columns generated by [=vars]vars(), a character vector of column names, a numeric vector of column positions, or NULL.
Examples
# While filter() accepts expressions with specific variables, the # scoped filter verbs take an expression with the pronoun `.` and # replicate it over all variables. This expression should be quoted # with all_vars() or any_vars(): all_vars(is.na(.)) any_vars(is.na(.)) # You can take the intersection of the replicated expressions: filter_all(mtcars, all_vars(. > 150)) # -> filter(mtcars, if_all(everything(), ~ .x > 150)) # Or the union: filter_all(mtcars, any_vars(. > 150)) # -> filter(mtcars, if_any(everything(), ~ . > 150)) # You can vary the selection of columns on which to apply the # predicate. filter_at() takes a vars() specification: filter_at(mtcars, vars(starts_with("d")), any_vars((. %% 2) == 0)) # -> filter(mtcars, if_any(starts_with("d"), ~ (.x %% 2) == 0)) # And filter_if() selects variables with a predicate function: filter_if(mtcars, ~ all(floor(.) == .), all_vars(. != 0)) # -> is_int <- function(x) all(floor(x) == x) filter(mtcars, if_all(where(is_int), ~ .x != 0))
Custom sections
Grouping variables
The grouping variables that are part of the selection are taken into account to determine filtered rows.
funs
Create a list of function calls
CRAN · 1.2.1 · dplyr/man/funs.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#deprecatedlifecycle-deprecated.svgoptions: alt='[Deprecated]'[Deprecated] funs() is deprecated; please use list() instead. We deprecated this function because it provided a unique way of specifying anonymous functions, rather than adopting the conventions used by purrr and other packages in the tidyverse.

Aliases
funs
Keywords
internal
Usage
funs(..., .args = list())
Arguments
...
<[rlang:args_data_masking]data-masking> A list of functions specified by: Their name, "mean" The function itself, mean A call to the function with . as a dummy argument, mean(., na.rm = TRUE) The following notations are not supported, see examples: An anonymous function, function(x) mean(x, na.rm = TRUE) An anonymous function in purrr notation, ~mean(., na.rm = TRUE)
.args, args
A named list of additional arguments to be added to all function calls. As funs() is being deprecated, use other methods to supply arguments: ... argument in [=summarise_at]scoped verbs or make own functions with [purrr:partial]purrr::partial().
Examples
funs("mean", mean(., na.rm = TRUE)) # -> list(mean = mean, mean = ~ mean(.x, na.rm = TRUE)) funs(m1 = mean, m2 = "mean", m3 = mean(., na.rm = TRUE)) # -> list(m1 = mean, m2 = "mean", m3 = ~ mean(.x, na.rm = TRUE))
glimpse
Get a glimpse of your data
CRAN · 1.2.1 · dplyr/man/glimpse.Rd · 2026-05-07

glimpse() is like a transposed version of print(): columns run down the page, and data runs across. This makes it possible to see every column in a data frame. It's a little like [=str]str() applied to a data frame but it tries to show you as much data as possible. (And it always shows the underlying data, even when applied to a remote data source.) glimpse() is provided by the pillar package, and re-exported by dplyr. See [pillar:glimpse]pillar::glimpse() for more details.

Aliases
glimpse
Value
x original x is (invisibly) returned, allowing glimpse() to be used within a data pipeline.
Examples
glimpse(mtcars) # Note that original x is (invisibly) returned, allowing `glimpse()` to be # used within a pipeline. mtcars |> glimpse() |> select(1:3) glimpse(starwars)
group_by
Group by one or more variables
CRAN · 1.2.1 · dplyr/man/group_by.Rd · 2026-05-07

Most data operations are done on groups defined by variables. group_by() takes an existing tbl and converts it into a grouped tbl where operations are performed "by group". ungroup() removes grouping.

Aliases
group_byungroup
Concepts
grouping functions
Usage
group_by(.data, ..., .add = FALSE, .drop = group_by_drop_default(.data)) ungroup(x, ...)
Arguments
.data
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
...
<[rlang:args_data_masking]data-masking> In group_by(), variables or computations to group by. Computations are always done on the ungrouped data frame. To perform computations on the grouped data, you need to use a separate mutate() step before the group_by(). Computations are not allowed in nest_by(). In ungroup(), variables to remove from the grouping.
.add
When FALSE, the default, group_by() will override existing groups. To add to the existing groups, use .add = TRUE.
.drop
Drop groups formed by factor levels that don't appear in the data? The default is TRUE except when .data has been previously grouped with .drop = FALSE. See [=group_by_drop_default]group_by_drop_default() for details.
x
A [=tbl]tbl()
Value
A grouped data frame with class grouped_df, unless the combination of ... and add yields a empty set of grouping columns, in which case a tibble will be returned.
Examples
by_cyl <- mtcars |> group_by(cyl) # grouping doesn't change how the data looks (apart from listing # how it's grouped): by_cyl # It changes how it acts with the other dplyr verbs: by_cyl |> summarise( disp = mean(disp), hp = mean(hp) ) by_cyl |> filter(disp == max(disp)) # Each call to summarise() removes a layer of grouping by_vs_am <- mtcars |> group_by(vs, am) by_vs <- by_vs_am |> summarise(n = n()) by_vs by_vs |> summarise(n = sum(n)) # To removing grouping, use ungroup by_vs |> ungroup() |> summarise(n = sum(n)) # By default, group_by() overrides existing grouping by_cyl |> group_by(vs, am) |> group_vars() # Use add = TRUE to instead append by_cyl |> group_by(vs, am, .add = TRUE) |> group_vars() # You can group by expressions: this is a short-hand # for a mutate() followed by a group_by() mtcars |> group_by(vsam = vs + am) # The implicit mutate() step is always performed on the # ungrouped data. Here we get 3 groups: mtcars |> group_by(vs) |> group_by(hp_cut = cut(hp, 3)) # If you want it to be performed by groups, # you have to use an explicit mutate() call. # Here we get 3 groups per value of vs mtcars |> group_by(vs) |> mutate(hp_cut = cut(hp, 3)) |> group_by(hp_cut) # when factors are involved and .drop = FALSE, groups can be empty tbl <- tibble( x = 1:10, y = factor(rep(c("a", "c"), each = 5), levels = c("a", "b", "c")) ) tbl |> group_by(y, .drop = FALSE) |> group_rows()
See also
Other grouping functions: group_map(), group_nest(), group_split(), group_trim()
Custom sections
Methods
These function are generics, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. Methods available in currently loaded packages: group_by(): [stage=render,results=rd]dplyr:::methods_rd("group_by"). ungroup(): [stage=render,results=rd]dplyr:::methods_rd("ungroup").
Ordering
Currently, group_by() internally orders the groups in ascending order. This results in ordered output from functions that aggregate groups, such as [=summarise]summarise(). When used as grouping columns, character vectors are ordered in the C locale for performance and reproducibility across R sessions. If the resulting ordering of your grouped operation matters and is dependent on the locale, you should follow up the grouped operation with an explicit call to [=arrange]arrange() and set the .locale argument. For example: html<div class="sourceCode">data |> group_by(chr) |> summarise(avg = mean(x)) |> arrange(chr, .locale = "en") html</div> This is often useful as a preliminary step before generating content intended for humans, such as an HTML table. Legacy behavior htmlhttps://lifecycle.r-lib.org/articles/stages.html#deprecatedlifecycle-deprecated.svgoptions: alt='[Deprecated]'[Deprecated] Prior to dplyr 1.1.0, character vector grouping columns were ordered in the system locale. Setting the global option dplyr.legacy_locale to TRUE retains this legacy behavior, but this has been deprecated. Update existing code to explicitly call arrange(.locale = ) instead. Run Sys.getlocale("LC_COLLATE") to determine your system locale, and compare that against the list in [stringi:stri_locale_list]stringi::stri_locale_list() to find an appropriate value for .locale, i.e. for American English, "en_US".
group_by_all
Group by a selection of variables
CRAN · 1.2.1 · dplyr/man/group_by_all.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#supersededlifecycle-superseded.svgoptions: alt='[Superseded]'[Superseded] Scoped verbs (_if, _at, _all) have been superseded by the use of [=pick]pick() or [=across]across() in an existing verb. See vignette("colwise") for details. These scoped variants of [=group_by]group_by() group a data frame by a selection of variables. Like [=group_by]group_by(), they have optional mutate semantics.

Aliases
group_by_allgroup_by_atgroup_by_if
Keywords
internal
Usage
group_by_all( .tbl, .funs = list(), ..., .add = FALSE, .drop = group_by_drop_default(.tbl) ) group_by_at( .tbl, .vars, .funs = list(), ..., .add = FALSE, .drop = group_by_drop_default(.tbl) ) group_by_if( .tbl, .predicate, .funs = list(), ..., .add = FALSE, .drop = group_by_drop_default(.tbl) )
Arguments
.tbl
A tbl object.
.funs
A function fun, a quosure style lambda ~ fun(.) or a list of either form.
...
Additional arguments for the function calls in .funs. These are evaluated only once, with [rlang:dyn-dots]tidy dots support.
.add
See [=group_by]group_by()
.drop
Drop groups formed by factor levels that don't appear in the data? The default is TRUE except when .data has been previously grouped with .drop = FALSE. See [=group_by_drop_default]group_by_drop_default() for details.
.vars
A list of columns generated by [=vars]vars(), a character vector of column names, a numeric vector of column positions, or NULL.
.predicate
A predicate function to be applied to the columns or a logical vector. The variables for which .predicate is or returns TRUE are selected. This argument is passed to [rlang:as_function]rlang::as_function() and thus supports quosure-style lambda functions and strings representing function names.
Examples
# Group a data frame by all variables: group_by_all(mtcars) # -> mtcars |> group_by(pick(everything())) # Group by variables selected with a predicate: group_by_if(iris, is.factor) # -> iris |> group_by(pick(where(is.factor))) # Group by variables selected by name: group_by_at(mtcars, vars(vs, am)) # -> mtcars |> group_by(pick(vs, am)) # Like group_by(), the scoped variants have optional mutate # semantics. This provide a shortcut for group_by() + mutate(): d <- tibble(x=c(1,1,2,2), y=c(1,2,1,2)) group_by_all(d, as.factor) # -> d |> group_by(across(everything(), as.factor)) group_by_if(iris, is.factor, as.character) # -> iris |> group_by(across(where(is.factor), as.character))
Custom sections
Grouping variables
Existing grouping variables are maintained, even if not included in the selection.
group_by_drop_default
Default value for .drop argument of group_by
CRAN · 1.2.1 · dplyr/man/group_by_drop_default.Rd · 2026-05-07

Default value for .drop argument of group_by

Aliases
group_by_drop_default
Keywords
internal
Usage
group_by_drop_default(.tbl)
Arguments
.tbl
A data frame
Value
TRUE unless .tbl is a grouped data frame that was previously obtained by group_by(.drop = FALSE)
Examples
group_by_drop_default(iris) iris |> group_by(Species) |> group_by_drop_default() iris |> group_by(Species, .drop = FALSE) |> group_by_drop_default()
group_cols
Select grouping variables
CRAN · 1.2.1 · dplyr/man/group_cols.Rd · 2026-05-07

This selection helpers matches grouping variables. It can be used in [=select]select() or [=vars]vars() selections.

Aliases
group_cols
Usage
group_cols(vars = NULL, data = NULL)
Arguments
vars
htmlhttps://lifecycle.r-lib.org/articles/stages.html#defunctlifecycle-defunct.svgoptions: alt='[Defunct]'[Defunct]
data
For advanced use only. The default NULL automatically finds the "current" data frames.
Examples
gdf <- iris |> group_by(Species) gdf |> select(group_cols()) # Remove the grouping variables from mutate selections: gdf |> mutate_at(vars(-group_cols()), `/`, 100) # -> No longer necessary with across() gdf |> mutate(across(everything(), ~ . / 100))
See also
[=groups]groups() and [=group_vars]group_vars() for retrieving the grouping variables outside selection contexts.
group_data
Grouping metadata
CRAN · 1.2.1 · dplyr/man/group_data.Rd · 2026-05-07

This collection of functions accesses data about grouped data frames in various ways: group_data() returns a data frame that defines the grouping structure. The columns give the values of the grouping variables. The last column, always called .rows, is a list of integer vectors that gives the location of the rows in each group. group_keys() returns a data frame describing the groups. group_rows() returns a list of integer vectors giving the rows that each group contains. group_indices() returns an integer vector the same length as .data that gives the group that each row belongs to. group_vars() gives names of grouping variables as character vector. groups() gives the names of the grouping variables as a list of symbols. group_size() gives the size of each group. n_groups() gives the total number of groups. See context for equivalent functions that return values for the current group.

Aliases
group_datagroup_keysgroup_rowsgroup_indicesgroup_varsgroupsgroup_sizen_groups
Keywords
internal
Usage
group_data(.data) group_keys(.tbl, ...) group_rows(.data) group_indices(.data, ...) group_vars(x) groups(x) group_size(x) n_groups(x)
Arguments
.data, .tbl, x
A data frame or extension (like a tibble or grouped tibble).
...
Unused.
Examples
df <- tibble(x = c(1,1,2,2)) group_vars(df) group_rows(df) group_data(df) group_indices(df) gf <- group_by(df, x) group_vars(gf) group_rows(gf) group_data(gf) group_indices(gf)
group_map
Apply a function to each group
CRAN · 1.2.1 · dplyr/man/group_map.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#experimentallifecycle-experimental.svgoptions: alt='[Experimental]'[Experimental] group_map(), group_modify() and group_walk() are purrr-style functions that can be used to iterate on grouped tibbles.

Aliases
group_mapgroup_modifygroup_walk
Concepts
grouping functions
Usage
group_map(.data, .f, ..., .keep = FALSE) group_modify(.data, .f, ..., .keep = FALSE) group_walk(.data, .f, ..., .keep = FALSE)
Arguments
.data
A grouped tibble
.f
A function or formula to apply to each group. If a function, it is used as is. It should have at least 2 formal arguments. If a formula, e.g. ~ head(.x), it is converted to a function. In the formula, you can use . or .x to refer to the subset of rows of .tbl for the given group .y to refer to the key, a one row tibble with one column per grouping variable that identifies the group
...
Additional arguments passed on to .f
.keep
are the grouping variables kept in .x
Details
Use group_modify() when summarize() is too limited, in terms of what you need to do and return for each group. group_modify() is good for "data frame in, data frame out". If that is too limited, you need to use a [=group_nest]nested or [=group_split]split workflow. group_modify() is an evolution of [=do]do(), if you have used that before. Each conceptual group of the data frame is exposed to the function .f with two pieces of information: The subset of the data for the group, exposed as .x. The key, a tibble with exactly one row and columns for each grouping variable, exposed as .y. For completeness, group_modify(), group_map and group_walk() also work on ungrouped data frames, in that case the function is applied to the entire data frame (exposed as .x), and .y is a one row tibble with no column, consistently with [=group_keys]group_keys().
Value
group_modify() returns a grouped tibble. In that case .f must return a data frame. group_map() returns a list of results from calling .f on each group. group_walk() calls .f for side effects and returns the input .tbl, invisibly.
Examples
# return a list mtcars |> group_by(cyl) |> group_map(~ head(.x, 2L)) # return a tibble grouped by `cyl` with 2 rows per group # the grouping data is recalculated mtcars |> group_by(cyl) |> group_modify(~ head(.x, 2L)) if (requireNamespace("broom", quietly = TRUE)) withAutoprint(\ # examplesIf # a list of tibbles iris |> group_by(Species) |> group_map(~ broom::tidy(lm(Petal.Length ~ Sepal.Length, data = .x))) # a restructured grouped tibble iris |> group_by(Species) |> group_modify(~ broom::tidy(lm(Petal.Length ~ Sepal.Length, data = .x))) \) # examplesIf # a list of vectors iris |> group_by(Species) |> group_map(~ quantile(.x$Petal.Length, probs = c(0.25, 0.5, 0.75))) # to use group_modify() the lambda must return a data frame iris |> group_by(Species) |> group_modify(~ quantile(.x$Petal.Length, probs = c(0.25, 0.5, 0.75)) |> tibble::enframe(name = "prob", value = "quantile") ) iris |> group_by(Species) |> group_modify(~ .x |> purrr::map_dfc(fivenum) |> mutate(nms = c("min", "Q1", "median", "Q3", "max")) ) # group_walk() is for side effects dir.create(temp <- tempfile()) iris |> group_by(Species) |> group_walk(~ write.csv(.x, file = file.path(temp, paste0(.y$Species, ".csv")))) list.files(temp, pattern = "csv$") unlink(temp, recursive = TRUE) # group_modify() and ungrouped data frames mtcars |> group_modify(~ head(.x, 2L))
See also
Other grouping functions: group_by(), group_nest(), group_split(), group_trim()
group_nest
Nest a tibble using a grouping specification
CRAN · 1.2.1 · dplyr/man/group_nest.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#experimentallifecycle-experimental.svgoptions: alt='[Experimental]'[Experimental] Nest a tibble using a grouping specification

Aliases
group_nest
Keywords
internal
Concepts
grouping functions
Usage
group_nest(.tbl, ..., .key = "data", keep = FALSE)
Arguments
.tbl
A tbl
...
Grouping specification, forwarded to [=group_by]group_by()
.key
the name of the list column
keep
Should the grouping columns be kept in the list column.
Value
A tbl with one row per unique combination of the grouping variables. The first columns are the grouping variables, followed by a list column of tibbles with matching rows of the remaining columns.
Examples
#----- use case 1: a grouped data frame iris |> group_by(Species) |> group_nest() # this can be useful if the grouped data has been altered before nesting iris |> group_by(Species) |> filter(Sepal.Length > mean(Sepal.Length)) |> group_nest() #----- use case 2: using group_nest() on a ungrouped data frame with # a grouping specification that uses the data mask starwars |> group_nest(species, homeworld)
See also
Other grouping functions: group_by(), group_map(), group_split(), group_trim()
Custom sections
Lifecycle
group_nest() is not stable because [tidyr:nest]tidyr::nest(.by =) provides very similar behavior. It may be deprecated in the future.
Grouped data frames
The primary use case for [=group_nest]group_nest() is with already grouped data frames, typically a result of [=group_by]group_by(). In this case [=group_nest]group_nest() only uses the first argument, the grouped tibble, and warns when ... is used.
Ungrouped data frames
When used on ungrouped data frames, [=group_nest]group_nest() forwards the ... to [=group_by]group_by() before nesting, therefore the ... are subject to the data mask.
group_split
Split data frame by groups
CRAN · 1.2.1 · dplyr/man/group_split.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#experimentallifecycle-experimental.svgoptions: alt='[Experimental]'[Experimental] [=group_split]group_split() works like [base:split]base::split() but: It uses the grouping structure from [=group_by]group_by() and therefore is subject to the data mask It does not name the elements of the list based on the grouping as this only works well for a single character grouping variable. Instead, use [=group_keys]group_keys() to access a data frame that defines the groups. group_split() is primarily designed to work with grouped data frames. You can pass ... to group and split an ungrouped data frame, but this is generally not very useful as you want have easy access to the group metadata.

Aliases
group_split
Keywords
internal
Concepts
grouping functions
Usage
group_split(.tbl, ..., .keep = TRUE)
Arguments
.tbl
A tbl.
...
If .tbl is an ungrouped data frame, a grouping specification, forwarded to [=group_by]group_by().
.keep
Should the grouping columns be kept?
Value
A list of tibbles. Each tibble contains the rows of .tbl for the associated group and all the columns, including the grouping variables. Note that this returns a [vctrs:list_of]list_of which is slightly stricter than a simple list but is useful for representing lists where every element has the same type.
Examples
ir <- iris |> group_by(Species) group_split(ir) group_keys(ir)
See also
Other grouping functions: group_by(), group_map(), group_nest(), group_trim()
Custom sections
Lifecycle
group_split() is not stable because you can achieve very similar results by manipulating the nested column returned from [tidyr:nest]tidyr::nest(.by =). That also retains the group keys all within a single data structure. group_split() may be deprecated in the future.
group_trim
Trim grouping structure
CRAN · 1.2.1 · dplyr/man/group_trim.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#experimentallifecycle-experimental.svgoptions: alt='[Experimental]'[Experimental] Drop unused levels of all factors that are used as grouping variables, then recalculates the grouping structure. group_trim() is particularly useful after a [=filter]filter() that is intended to select a subset of groups.

Aliases
group_trim
Concepts
grouping functions
Usage
group_trim(.tbl, .drop = group_by_drop_default(.tbl))
Arguments
.tbl
A [=grouped_df]grouped data frame
.drop
See [=group_by]group_by()
Value
A [=grouped_df]grouped data frame
Examples
iris |> group_by(Species) |> filter(Species == "setosa", .preserve = TRUE) |> group_trim()
See also
Other grouping functions: group_by(), group_map(), group_nest(), group_split()
grouped_df
A grouped data frame.
CRAN · 1.2.1 · dplyr/man/grouped_df.Rd · 2026-05-07

The easiest way to create a grouped data frame is to call the group_by() method on a data frame or tbl: this will take care of capturing the unevaluated expressions for you. These functions are designed for programmatic use. For data analysis purposes see [=group_data]group_data() for the accessor functions that retrieve various metadata from a grouped data frames.

Aliases
grouped_dfis.grouped_dfis_grouped_df
Keywords
internal
Usage
grouped_df(data, vars, drop = group_by_drop_default(data)) is.grouped_df(x) is_grouped_df(x)
Arguments
data
a tbl or data frame.
vars
A character vector.
drop
When .drop = TRUE, empty groups are dropped.
ident
Flag a character vector as SQL identifiers
CRAN · 1.2.1 · dplyr/man/ident.Rd · 2026-05-07

ident() takes strings and turns them as database identifiers (e.g. table or column names) quoting them using the identifer rules for your database. ident_q() does the same, but assumes the names have already been quoted, preventing them from being quoted again. These are generally for internal use only; if you need to supply an table name that is qualified with schema or catalog, or has already been quoted for some other reason, use I().

Aliases
ident
Usage
ident(...)
Arguments
...
A character vector, or name-value pairs.
Examples
# Identifiers are escaped with " if (requireNamespace("dbplyr", quietly = TRUE)) withAutoprint(\ # examplesIf ident("x") \) # examplesIf
if_else
Vectorised if-else
CRAN · 1.2.1 · dplyr/man/if_else.Rd · 2026-05-07

if_else() is a vectorized [=if]if-else. Compared to the base R equivalent, [=ifelse]ifelse(), this function allows you to handle missing values in the condition with missing and always takes true, false, and missing into account when determining what the output type should be.

Aliases
if_else
Usage
if_else( condition, true, false, missing = NULL, ..., ptype = NULL, size = deprecated() )
Arguments
condition
A logical vector
true, false
Vectors to use for TRUE and FALSE values of condition. Both true and false will be [vctrs:theory-faq-recycling]recycled to the size of condition. true, false, and missing (if used) will be cast to their common type.
missing
If not NULL, will be used as the value for NA values of condition. Follows the same size and type rules as true and false.
...
These dots are for future extensions and must be empty.
ptype
An optional prototype declaring the desired output type. If supplied, this overrides the common type of true, false, and missing.
size
htmlhttps://lifecycle.r-lib.org/articles/stages.html#deprecatedlifecycle-deprecated.svgoptions: alt='[Deprecated]'[Deprecated] Output size is always taken from condition.
Value
A vector with the same size as condition and the same type as the common type of true, false, and missing. Where condition is TRUE, the matching values from true, where it is FALSE, the matching values from false, and where it is NA, the matching values from missing, if provided, otherwise a missing value will be used.
Examples
x <- c(-5:5, NA) if_else(x < 0, NA, x) # Explicitly handle `NA` values in the `condition` with `missing` if_else(x < 0, "negative", "positive", missing = "missing") # Unlike `ifelse()`, `if_else()` preserves types x <- factor(sample(letters[1:5], 10, replace = TRUE)) ifelse(x %in% c("a", "b", "c"), x, NA) if_else(x %in% c("a", "b", "c"), x, NA) # `if_else()` is often useful for creating new columns inside of `mutate()` starwars |> mutate(category = if_else(height < 100, "short", "tall"), .keep = "used")
See also
[vctrs:vec_if_else]vctrs::vec_if_else()
join_by
Join specifications
CRAN · 1.2.1 · dplyr/man/join_by.Rd · 2026-05-07

join_by() constructs a specification that describes how to join two tables using a small domain specific language. The result can be supplied as the by argument to any of the join functions (such as [=left_join]left_join()).

Aliases
join_byclosestoverlapswithin
Usage
join_by(...)
Arguments
...
Expressions specifying the join. Each expression should consist of one of the following: Equality condition: == Inequality conditions: >=, >, <=, or < Rolling helper: closest() Overlap helpers: between(), within(), or overlaps() Other expressions are not supported. If you need to perform a join on a computed variable, e.g. join_by(sales_date - 40 >= promo_date), you'll need to precompute and store it in a separate column. Column names should be specified as quoted or unquoted names. By default, the name on the left-hand side of a join condition refers to the left-hand table, unless overridden by explicitly prefixing the column name with either x$ or y$. If a single column name is provided without any join conditions, it is interpreted as if that column name was duplicated on each side of ==, i.e. x is interpreted as x == x.
Examples
sales <- tibble( id = c(1L, 1L, 1L, 2L, 2L), sale_date = as.Date(c("2018-12-31", "2019-01-02", "2019-01-05", "2019-01-04", "2019-01-01")) ) sales promos <- tibble( id = c(1L, 1L, 2L), promo_date = as.Date(c("2019-01-01", "2019-01-05", "2019-01-02")) ) promos # Match `id` to `id`, and `sale_date` to `promo_date` by <- join_by(id, sale_date == promo_date) left_join(sales, promos, by) # For each `sale_date` within a particular `id`, # find all `promo_date`s that occurred before that particular sale by <- join_by(id, sale_date >= promo_date) left_join(sales, promos, by) # For each `sale_date` within a particular `id`, # find only the closest `promo_date` that occurred before that sale by <- join_by(id, closest(sale_date >= promo_date)) left_join(sales, promos, by) # If you want to disallow exact matching in rolling joins, use `>` rather # than `>=`. Note that the promo on `2019-01-05` is no longer considered the # closest match for the sale on the same date. by <- join_by(id, closest(sale_date > promo_date)) left_join(sales, promos, by) # Same as before, but also require that the promo had to occur at most 1 # day before the sale was made. We'll use a full join to see that id 2's # promo on `2019-01-02` is no longer matched to the sale on `2019-01-04`. sales <- mutate(sales, sale_date_lower = sale_date - 1) by <- join_by(id, closest(sale_date >= promo_date), sale_date_lower <= promo_date) full_join(sales, promos, by) # --------------------------------------------------------------------------- segments <- tibble( segment_id = 1:4, chromosome = c("chr1", "chr2", "chr2", "chr1"), start = c(140, 210, 380, 230), end = c(150, 240, 415, 280) ) segments reference <- tibble( reference_id = 1:4, chromosome = c("chr1", "chr1", "chr2", "chr2"), start = c(100, 200, 300, 415), end = c(150, 250, 399, 450) ) reference # Find every time a segment `start` falls between the reference # `[start, end]` range. by <- join_by(chromosome, between(start, start, end)) full_join(segments, reference, by) # If you wanted the reference columns first, supply `reference` as `x` # and `segments` as `y`, then explicitly refer to their columns using `x$` # and `y$`. by <- join_by(chromosome, between(y$start, x$start, x$end)) full_join(reference, segments, by) # Find every time a segment falls completely within a reference. # Sometimes using `x$` and `y$` makes your intentions clearer, even if they # match the default behavior. by <- join_by(chromosome, within(x$start, x$end, y$start, y$end)) inner_join(segments, reference, by) # Find every time a segment overlaps a reference in any way. by <- join_by(chromosome, overlaps(x$start, x$end, y$start, y$end)) full_join(segments, reference, by) # It is common to have right-open ranges with bounds like `[)`, which would # mean an end value of `415` would no longer overlap a start value of `415`. # Setting `bounds` allows you to compute overlaps with those kinds of ranges. by <- join_by(chromosome, overlaps(x$start, x$end, y$start, y$end, bounds = "[)")) full_join(segments, reference, by)
Custom sections
Join types
The following types of joins are supported by dplyr: Equality joins Inequality joins Rolling joins Overlap joins Cross joins Equality, inequality, rolling, and overlap joins are discussed in more detail below. Cross joins are implemented through [=cross_join]cross_join(). Equality joins Equality joins require keys to be equal between one or more pairs of columns, and are the most common type of join. To construct an equality join using join_by(), supply two column names to join with separated by ==. Alternatively, supplying a single name will be interpreted as an equality join between two columns of the same name. For example, join_by(x) is equivalent to join_by(x == x). Inequality joins Inequality joins match on an inequality, such as >, >=, <, or <=, and are common in time series analysis and genomics. To construct an inequality join using join_by(), supply two column names separated by one of the above mentioned inequalities. Note that inequality joins will match a single row in x to a potentially large number of rows in y. Be extra careful when constructing inequality join specifications! Rolling joins Rolling joins are a variant of inequality joins that limit the results returned from an inequality join condition. They are useful for "rolling" the closest match forward/backwards when there isn't an exact match. To construct a rolling join, wrap an inequality with closest(). closest(expr) expr must be an inequality involving one of: >, >=, <, or <=. For example, closest(x >= y) is interpreted as: For each value in x, find the closest value in y that is less than or equal to that x value. closest() will always use the left-hand table (x) as the primary table, and the right-hand table (y) as the one to find the closest match in, regardless of how the inequality is specified. For example, closest(y$a >= x$b) will always be interpreted as closest(x$b <= y$a). Overlap joins Overlap joins are a special case of inequality joins involving one or two columns from the left-hand table overlapping a range defined by two columns from the right-hand table. There are three helpers that join_by() recognizes to assist with constructing overlap joins, all of which can be constructed from simpler inequalities. between(x, y_lower, y_upper, ..., bounds = "[]") For each value in x, this finds everywhere that value falls between [y_lower, y_upper]. Equivalent to x >= y_lower, x <= y_upper by default. bounds can be one of "[]", "[)", "(]", or "()" to alter the inclusiveness of the lower and upper bounds. This changes whether >= or > and <= or < are used to build the inequalities shown above. Dots are for future extensions and must be empty. within(x_lower, x_upper, y_lower, y_upper) For each range in [x_lower, x_upper], this finds everywhere that range falls completely within [y_lower, y_upper]. Equivalent to x_lower >= y_lower, x_upper <= y_upper. The inequalities used to build within() are the same regardless of the inclusiveness of the supplied ranges. overlaps(x_lower, x_upper, y_lower, y_upper, ..., bounds = "[]") For each range in [x_lower, x_upper], this finds everywhere that range overlaps [y_lower, y_upper] in any capacity. Equivalent to x_lower <= y_upper, x_upper >= y_lower by default. bounds can be one of "[]", "[)", "(]", or "()" to alter the inclusiveness of the lower and upper bounds. "[]" uses <= and >=, but the 3 other options use < and > and generate the exact same inequalities. Dots are for future extensions and must be empty. These conditions assume that the ranges are well-formed and non-empty, i.e. x_lower <= x_upper when bounds are treated as "[]", and x_lower < x_upper otherwise.
Column referencing
When specifying join conditions, join_by() assumes that column names on the left-hand side of the condition refer to the left-hand table (x), and names on the right-hand side of the condition refer to the right-hand table (y). Occasionally, it is clearer to be able to specify a right-hand table name on the left-hand side of the condition, and vice versa. To support this, column names can be prefixed by x$ or y$ to explicitly specify which table they come from.
last_dplyr_warnings
Show warnings from the last command
CRAN · 1.2.1 · dplyr/man/last_dplyr_warnings.Rd · 2026-05-07

Warnings that occur inside a dplyr verb like mutate() are caught and stashed away instead of being emitted to the console. This prevents rowwise and grouped data frames from flooding the console with warnings. To see the original warnings, use last_dplyr_warnings().

Aliases
last_dplyr_warnings
Keywords
internal
Usage
last_dplyr_warnings(n = 5)
Arguments
n
Passed to [=head]head() so that only the first n warnings are displayed.
lead-lag
Compute lagged or leading values
CRAN · 1.2.1 · dplyr/man/lead-lag.Rd · 2026-05-07

Find the "previous" (lag()) or "next" (lead()) values in a vector. Useful for comparing values behind of or ahead of the current values.

Aliases
lead-laglaglead
Usage
lag(x, n = 1L, default = NULL, order_by = NULL, ...) lead(x, n = 1L, default = NULL, order_by = NULL, ...)
Arguments
x
A vector
n
Positive integer of length 1, giving the number of positions to lag or lead by
default
The value used to pad x back to its original size after the lag or lead has been applied. The default, NULL, pads with a missing value. If supplied, this must be a vector with size 1, which will be cast to the type of x.
order_by
An optional secondary vector that defines the ordering to use when applying the lag or lead to x. If supplied, this must be the same size as x.
...
Not used.
Value
A vector with the same type and size as x.
Examples
lag(1:5) lead(1:5) x <- 1:5 tibble(behind = lag(x), x, ahead = lead(x)) # If you want to look more rows behind or ahead, use `n` lag(1:5, n = 1) lag(1:5, n = 2) lead(1:5, n = 1) lead(1:5, n = 2) # If you want to define a value to pad with, use `default` lag(1:5) lag(1:5, default = 0) lead(1:5) lead(1:5, default = 6) # If the data are not already ordered, use `order_by` scrambled <- slice_sample( tibble(year = 2000:2005, value = (0:5) ^ 2), prop = 1 ) wrong <- mutate(scrambled, previous_year_value = lag(value)) arrange(wrong, year) right <- mutate(scrambled, previous_year_value = lag(value, order_by = year)) arrange(right, year)
make_tbl
Create a "tbl" object
CRAN · 1.2.1 · dplyr/man/make_tbl.Rd · 2026-05-07

tbl() is the standard constructor for tbls. is.tbl() tests.

Aliases
make_tbl
Keywords
internal
Usage
make_tbl(subclass, ...)
Arguments
subclass
name of subclass. "tbl" is an abstract base class, so you must supply this value. tbl_ is automatically prepended to the class name
...
For tbl(), other fields used by class.
mutate
Create, modify, and delete columns
CRAN · 1.2.1 · dplyr/man/mutate.Rd · 2026-05-07

mutate() creates new columns that are functions of existing variables. It can also modify (if the name is the same as an existing column) and delete columns (by setting their value to NULL).

Aliases
mutatemutate.data.frame
Concepts
single table verbs
Usage
mutate(.data, ...) mutatedata.frame( .data, ..., .by = NULL, .keep = c("all", "used", "unused", "none"), .before = NULL, .after = NULL )
Arguments
.data
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
...
<[rlang:args_data_masking]data-masking> Name-value pairs. The name gives the name of the column in the output. The value can be: A vector of length 1, which will be recycled to the correct length. A vector the same length as the current group (or the whole data frame if ungrouped). NULL, to remove the column. A data frame or tibble, to create multiple columns in the output.
.by
<[=dplyr_tidy_select]tidy-select> Optionally, a selection of columns to group by for just this operation, functioning as an alternative to [=group_by]group_by(). For details and examples, see [=dplyr_by]?dplyr_by.
.keep
Control which columns from .data are retained in the output. Grouping columns and columns created by ... are always kept. "all" retains all columns from .data. This is the default. "used" retains only the columns used in ... to create new columns. This is useful for checking your work, as it displays inputs and outputs side-by-side. "unused" retains only the columns not used in ... to create new columns. This is useful if you generate new columns, but no longer need the columns used to generate them. "none" doesn't retain any extra columns from .data. Only the grouping variables and columns created by ... are kept.
.before, .after
<[=dplyr_tidy_select]tidy-select> Optionally, control where new columns should appear (the default is to add to the right hand side). See [=relocate]relocate() for more details.
Value
An object of the same type as .data. The output has the following properties: Columns from .data will be preserved according to the .keep argument. Existing columns that are modified by ... will always be returned in their original location. New columns created through ... will be placed according to the .before and .after arguments. The number of rows is not affected. Columns given the value NULL will be removed. Groups will be recomputed if a grouping variable is mutated. Data frame attributes are preserved.
Examples
# Newly created variables are available immediately starwars |> select(name, mass) |> mutate( mass2 = mass * 2, mass2_squared = mass2 * mass2 ) # As well as adding new variables, you can use mutate() to # remove variables and modify existing variables. starwars |> select(name, height, mass, homeworld) |> mutate( mass = NULL, height = height * 0.0328084 # convert to feet ) # Use across() with mutate() to apply a transformation # to multiple columns in a tibble. starwars |> select(name, homeworld, species) |> mutate(across(!name, as.factor)) # see more in ?across # Window functions are useful for grouped mutates: starwars |> select(name, mass, homeworld) |> group_by(homeworld) |> mutate(rank = min_rank(desc(mass))) # see `vignette("window-functions")` for more details # By default, new columns are placed on the far right. df <- tibble(x = 1, y = 2) df |> mutate(z = x + y) df |> mutate(z = x + y, .before = 1) df |> mutate(z = x + y, .after = x) # By default, mutate() keeps all columns from the input data. df <- tibble(x = 1, y = 2, a = "a", b = "b") df |> mutate(z = x + y, .keep = "all") # the default df |> mutate(z = x + y, .keep = "used") df |> mutate(z = x + y, .keep = "unused") df |> mutate(z = x + y, .keep = "none") # Grouping ---------------------------------------- # The mutate operation may yield different results on grouped # tibbles because the expressions are computed within groups. # The following normalises `mass` by the global average: starwars |> select(name, mass, species) |> mutate(mass_norm = mass / mean(mass, na.rm = TRUE)) # Whereas this normalises `mass` by the averages within species # levels: starwars |> select(name, mass, species) |> group_by(species) |> mutate(mass_norm = mass / mean(mass, na.rm = TRUE)) # Indirection ---------------------------------------- # Refer to column names stored as strings with the `.data` pronoun: vars <- c("mass", "height") mutate(starwars, prod = .data[[vars[[1]]]] * .data[[vars[[2]]]]) # Learn more in ?rlang::args_data_masking
See also
Other single table verbs: arrange(), filter(), reframe(), rename(), select(), slice(), summarise()
Custom sections
Useful mutate functions
+, -, [=log]log(), etc., for their usual mathematical meanings [=lead]lead(), [=lag]lag() [=dense_rank]dense_rank(), [=min_rank]min_rank(), [=percent_rank]percent_rank(), [=row_number]row_number(), [=cume_dist]cume_dist(), [=ntile]ntile() [=cumsum]cumsum(), [=cummean]cummean(), [=cummin]cummin(), [=cummax]cummax(), [=cumany]cumany(), [=cumall]cumall() [=na_if]na_if(), [=coalesce]coalesce() [=if_else]if_else(), [=recode]recode(), [=case_when]case_when()
Grouped tibbles
Because mutating expressions are computed within groups, they may yield different results on grouped tibbles. This will be the case as soon as an aggregating, lagging, or ranking function is involved. Compare this ungrouped mutate: html<div class="sourceCode">starwars |> select(name, mass, species) |> mutate(mass_norm = mass / mean(mass, na.rm = TRUE)) html</div> With the grouped equivalent: html<div class="sourceCode">starwars |> select(name, mass, species) |> group_by(species) |> mutate(mass_norm = mass / mean(mass, na.rm = TRUE)) html</div> The former normalises mass by the global average whereas the latter normalises by the averages within species levels.
Methods
This function is a generic, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. Methods available in currently loaded packages: [stage=render,results=rd]dplyr:::methods_rd("mutate").
mutate-joins
Mutating joins
CRAN · 1.2.1 · dplyr/man/mutate-joins.Rd · 2026-05-07

Mutating joins add columns from y to x, matching observations based on the keys. There are four mutating joins: the inner join, and the three outer joins. Inner join An inner_join() only keeps observations from x that have a matching key in y. The most important property of an inner join is that unmatched rows in either input are not included in the result. This means that generally inner joins are not appropriate in most analyses, because it is too easy to lose observations. Outer joins The three outer joins keep observations that appear in at least one of the data frames: A left_join() keeps all observations in x. A right_join() keeps all observations in y. A full_join() keeps all observations in x and y.

Aliases
mutate-joinsjoinjoin.data.frameinner_joininner_join.data.frameleft_joinleft_join.data.frameright_joinright_join.data.framefull_joinfull_join.data.frame
Concepts
joins
Usage
inner_join( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep = NULL ) inner_joindata.frame( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep = NULL, na_matches = c("na", "never"), multiple = "all", unmatched = "drop", relationship = NULL ) left_join( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep = NULL ) left_joindata.frame( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep = NULL, na_matches = c("na", "never"), multiple = "all", unmatched = "drop", relationship = NULL ) right_join( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep = NULL ) right_joindata.frame( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep = NULL, na_matches = c("na", "never"), multiple = "all", unmatched = "drop", relationship = NULL ) full_join( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep = NULL ) full_joindata.frame( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep = NULL, na_matches = c("na", "never"), multiple = "all", relationship = NULL )
Arguments
x, y
A pair of data frames, data frame extensions (e.g. a tibble), or lazy data frames (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
by
A join specification created with [=join_by]join_by(), or a character vector of variables to join by. If NULL, the default, *_join() will perform a natural join, using all variables in common across x and y. A message lists the variables so that you can check they're correct; suppress the message by supplying by explicitly. To join on different variables between x and y, use a [=join_by]join_by() specification. For example, join_by(a == b) will match x$a to y$b. To join by multiple variables, use a [=join_by]join_by() specification with multiple expressions. For example, join_by(a == b, c == d) will match x$a to y$b and x$c to y$d. If the column names are the same between x and y, you can shorten this by listing only the variable names, like join_by(a, c). [=join_by]join_by() can also be used to perform inequality, rolling, and overlap joins. See the documentation at [=join_by]?join_by for details on these types of joins. For simple equality joins, you can alternatively specify a character vector of variable names to join by. For example, by = c("a", "b") joins x$a to y$a and x$b to y$b. If variable names differ between x and y, use a named character vector like by = c("x_a" = "y_a", "x_b" = "y_b"). To perform a cross-join, generating all combinations of x and y, see [=cross_join]cross_join().
copy
If x and y are not from the same data source, and copy is TRUE, then y will be copied into the same src as x. This allows you to join tables across srcs, but it is a potentially expensive operation so you must opt into it.
suffix
If there are non-joined duplicate variables in x and y, these suffixes will be added to the output to disambiguate them. Should be a character vector of length 2.
...
Other parameters passed onto methods.
keep
Should the join keys from both x and y be preserved in the output? If NULL, the default, joins on equality retain only the keys from x, while joins on inequality retain the keys from both inputs. If TRUE, all keys from both inputs are retained. If FALSE, only keys from x are retained. For right and full joins, the data in key columns corresponding to rows that only exist in y are merged into the key columns from x. Can't be used when joining on inequality conditions.
na_matches
Should two NA or two NaN values match? "na", the default, treats two NA or two NaN values as equal, like %in%, [=match]match(), and [=merge]merge(). "never" treats two NA or two NaN values as different, and will never match them together or to any other values. This is similar to joins for database sources and to base::merge(incomparables = NA).
multiple
Handling of rows in x with multiple matches in y. For each row of x: "all", the default, returns every match detected in y. This is the same behavior as SQL. "any" returns one match detected in y, with no guarantees on which match will be returned. It is often faster than "first" and "last" if you just need to detect if there is at least one match. "first" returns the first match detected in y. "last" returns the last match detected in y.
unmatched
How should unmatched keys that would result in dropped rows be handled? "drop" drops unmatched keys from the result. "error" throws an error if unmatched keys are detected. unmatched is intended to protect you from accidentally dropping rows during a join. It only checks for unmatched keys in the input that could potentially drop rows. For left joins, it checks y. For right joins, it checks x. For inner joins, it checks both x and y. In this case, unmatched is also allowed to be a character vector of length 2 to specify the behavior for x and y independently.
relationship
Handling of the expected relationship between the keys of x and y. If the expectations chosen from the list below are invalidated, an error is thrown. NULL, the default, doesn't expect there to be any relationship between x and y. However, for equality joins it will check for a many-to-many relationship (which is typically unexpected) and will warn if one occurs, encouraging you to either take a closer look at your inputs or make this relationship explicit by specifying "many-to-many". See the Many-to-many relationships section for more details. "one-to-one" expects: Each row in x matches at most 1 row in y. Each row in y matches at most 1 row in x. "one-to-many" expects: Each row in y matches at most 1 row in x. "many-to-one" expects: Each row in x matches at most 1 row in y. "many-to-many" doesn't perform any relationship checks, but is provided to allow you to be explicit about this relationship if you know it exists. relationship doesn't handle cases where there are zero matches. For that, see unmatched.
Value
An object of the same type as x (including the same groups). The order of the rows and columns of x is preserved as much as possible. The output has the following properties: The rows are affect by the join type. inner_join() returns matched x rows. left_join() returns all x rows. right_join() returns matched of x rows, followed by unmatched y rows. full_join() returns all x rows, followed by unmatched y rows. Output columns include all columns from x and all non-key columns from y. If keep = TRUE, the key columns from y are included as well. If non-key columns in x and y have the same name, suffixes are added to disambiguate. If keep = TRUE and key columns in x and y have the same name, suffixes are added to disambiguate these as well. If keep = FALSE, output columns included in by are coerced to their common type between x and y.
Examples
band_members |> inner_join(band_instruments) band_members |> left_join(band_instruments) band_members |> right_join(band_instruments) band_members |> full_join(band_instruments) # To suppress the message about joining variables, supply `by` band_members |> inner_join(band_instruments, by = join_by(name)) # This is good practice in production code # Use an equality expression if the join variables have different names band_members |> full_join(band_instruments2, by = join_by(name == artist)) # By default, the join keys from `x` and `y` are coalesced in the output; use # `keep = TRUE` to keep the join keys from both `x` and `y` band_members |> full_join(band_instruments2, by = join_by(name == artist), keep = TRUE) # If a row in `x` matches multiple rows in `y`, all the rows in `y` will be # returned once for each matching row in `x`. df1 <- tibble(x = 1:3) df2 <- tibble(x = c(1, 1, 2), y = c("first", "second", "third")) df1 |> left_join(df2) # If a row in `y` also matches multiple rows in `x`, this is known as a # many-to-many relationship, which is typically a result of an improperly # specified join or some kind of messy data. In this case, a warning is # thrown by default: df3 <- tibble(x = c(1, 1, 1, 3)) df3 |> left_join(df2) # In the rare case where a many-to-many relationship is expected, set # `relationship = "many-to-many"` to silence this warning df3 |> left_join(df2, relationship = "many-to-many") # Use `join_by()` with a condition other than `==` to perform an inequality # join. Here we match on every instance where `df1$x > df2$x`. df1 |> left_join(df2, join_by(x > x)) # By default, NAs match other NAs so that there are two # rows in the output of this join: df1 <- data.frame(x = c(1, NA), y = 2) df2 <- data.frame(x = c(1, NA), z = 3) left_join(df1, df2) # You can optionally request that NAs don't match, giving a # a result that more closely resembles SQL joins left_join(df1, df2, na_matches = "never")
See also
Other joins: cross_join(), filter-joins, nest_join()
Custom sections
Many-to-many relationships
By default, dplyr guards against many-to-many relationships in equality joins by throwing a warning. These occur when both of the following are true: A row in x matches multiple rows in y. A row in y matches multiple rows in x. This is typically surprising, as most joins involve a relationship of one-to-one, one-to-many, or many-to-one, and is often the result of an improperly specified join. Many-to-many relationships are particularly problematic because they can result in a Cartesian explosion of the number of rows returned from the join. If a many-to-many relationship is expected, silence this warning by explicitly setting relationship = "many-to-many". In production code, it is best to preemptively set relationship to whatever relationship you expect to exist between the keys of x and y, as this forces an error to occur immediately if the data doesn't align with your expectations. Inequality joins typically result in many-to-many relationships by nature, so they don't warn on them by default, but you should still take extra care when specifying an inequality join, because they also have the capability to return a large number of rows. Rolling joins don't warn on many-to-many relationships either, but many rolling joins follow a many-to-one relationship, so it is often useful to set relationship = "many-to-one" to enforce this. Note that in SQL, most database providers won't let you specify a many-to-many relationship between two tables, instead requiring that you create a third junction table that results in two one-to-many relationships instead.
Methods
These functions are generics, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. Methods available in currently loaded packages: inner_join(): [stage=render,results=rd]dplyr:::methods_rd("inner_join"). left_join(): [stage=render,results=rd]dplyr:::methods_rd("left_join"). right_join(): [stage=render,results=rd]dplyr:::methods_rd("right_join"). full_join(): [stage=render,results=rd]dplyr:::methods_rd("full_join").
mutate_all
Mutate multiple columns
CRAN · 1.2.1 · dplyr/man/mutate_all.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#supersededlifecycle-superseded.svgoptions: alt='[Superseded]'[Superseded] Scoped verbs (_if, _at, _all) have been superseded by the use of [=pick]pick() or [=across]across() in an existing verb. See vignette("colwise") for details. The scoped variants of [=mutate]mutate() and [=transmute]transmute() make it easy to apply the same transformation to multiple variables. There are three variants: _all affects every variable _at affects variables selected with a character vector or vars() _if affects variables selected with a predicate function:

Aliases
mutate_allmutate_ifmutate_attransmute_alltransmute_iftransmute_at
Keywords
internal
Usage
mutate_all(.tbl, .funs, ...) mutate_if(.tbl, .predicate, .funs, ...) mutate_at(.tbl, .vars, .funs, ..., .cols = NULL) transmute_all(.tbl, .funs, ...) transmute_if(.tbl, .predicate, .funs, ...) transmute_at(.tbl, .vars, .funs, ..., .cols = NULL)
Arguments
.tbl
A tbl object.
.funs
A function fun, a quosure style lambda ~ fun(.) or a list of either form.
...
Additional arguments for the function calls in .funs. These are evaluated only once, with [rlang:dyn-dots]tidy dots support.
.predicate
A predicate function to be applied to the columns or a logical vector. The variables for which .predicate is or returns TRUE are selected. This argument is passed to [rlang:as_function]rlang::as_function() and thus supports quosure-style lambda functions and strings representing function names.
.vars
A list of columns generated by [=vars]vars(), a character vector of column names, a numeric vector of column positions, or NULL.
.cols
This argument has been renamed to .vars to fit dplyr's terminology and is deprecated.
Value
A data frame. By default, the newly created columns have the shortest names needed to uniquely identify the output. To force inclusion of a name, even when not needed, name the input (see examples for details).
Examples
iris <- as_tibble(iris) # All variants can be passed functions and additional arguments, # purrr-style. The _at() variants directly support strings. Here # we'll scale the variables `height` and `mass`: scale2 <- function(x, na.rm = FALSE) (x - mean(x, na.rm = na.rm)) / sd(x, na.rm) starwars |> mutate_at(c("height", "mass"), scale2) # -> starwars |> mutate(across(c("height", "mass"), scale2)) # You can pass additional arguments to the function: starwars |> mutate_at(c("height", "mass"), scale2, na.rm = TRUE) starwars |> mutate_at(c("height", "mass"), ~scale2(., na.rm = TRUE)) # -> starwars |> mutate(across(c("height", "mass"), ~ scale2(.x, na.rm = TRUE))) # You can also supply selection helpers to _at() functions but you have # to quote them with vars(): iris |> mutate_at(vars(matches("Sepal")), log) iris |> mutate(across(matches("Sepal"), log)) # The _if() variants apply a predicate function (a function that # returns TRUE or FALSE) to determine the relevant subset of # columns. Here we divide all the numeric columns by 100: starwars |> mutate_if(is.numeric, scale2, na.rm = TRUE) starwars |> mutate(across(where(is.numeric), ~ scale2(.x, na.rm = TRUE))) # mutate_if() is particularly useful for transforming variables from # one type to another iris |> mutate_if(is.factor, as.character) iris |> mutate_if(is.double, as.integer) # -> iris |> mutate(across(where(is.factor), as.character)) iris |> mutate(across(where(is.double), as.integer)) # Multiple transformations ---------------------------------------- # If you want to apply multiple transformations, pass a list of # functions. When there are multiple functions, they create new # variables instead of modifying the variables in place: iris |> mutate_if(is.numeric, list(scale2, log)) iris |> mutate_if(is.numeric, list(~scale2(.), ~log(.))) iris |> mutate_if(is.numeric, list(scale = scale2, log = log)) # -> iris |> as_tibble() |> mutate(across(where(is.numeric), list(scale = scale2, log = log))) # When there's only one function in the list, it modifies existing # variables in place. Give it a name to instead create new variables: iris |> mutate_if(is.numeric, list(scale2)) iris |> mutate_if(is.numeric, list(scale = scale2))
See also
[=scoped]The other scoped verbs, [=vars]vars()
Custom sections
Grouping variables
If applied on a grouped tibble, these operations are not applied to the grouping variables. The behaviour depends on whether the selection is implicit (all and if selections) or explicit (at selections). Grouping variables covered by explicit selections in mutate_at() and transmute_at() are always an error. Add -group_cols() to the [=vars]vars() selection to avoid this: html<div class="sourceCode">data |> mutate_at(vars(-group_cols(), ...), myoperation) html</div> Or remove group_vars() from the character vector of column names: html<div class="sourceCode">nms <- setdiff(nms, group_vars(data)) data |> mutate_at(vars, myoperation) html</div> Grouping variables covered by implicit selections are ignored by mutate_all(), transmute_all(), mutate_if(), and transmute_if().
Naming
The names of the new columns are derived from the names of the input variables and the names of the functions. if there is only one unnamed function (i.e. if .funs is an unnamed list of length one), the names of the input variables are used to name the new columns; for _at functions, if there is only one unnamed variable (i.e., if .vars is of the form vars(a_single_column)) and .funs has length greater than one, the names of the functions are used to name the new columns; otherwise, the new names are created by concatenating the names of the input variables and the names of the functions, separated with an underscore "_". The .funs argument can be a named or unnamed list. If a function is unnamed and the name cannot be derived automatically, a name of the form "fn#" is used. Similarly, [=vars]vars() accepts named and unnamed arguments. If a variable in .vars is named, a new column by that name will be created. Name collisions in the new columns are disambiguated using a unique suffix.
n_distinct
Count unique combinations
CRAN · 1.2.1 · dplyr/man/n_distinct.Rd · 2026-05-07

n_distinct() counts the number of unique/distinct combinations in a set of one or more vectors. It's a faster and more concise equivalent to nrow(unique(data.frame(...))).

Aliases
n_distinct
Usage
n_distinct(..., na.rm = FALSE)
Arguments
...
Unnamed vectors. If multiple vectors are supplied, then they should have the same length.
na.rm
If TRUE, exclude missing observations from the count. If there are multiple vectors in ..., an observation will be excluded if any of the values are missing.
Value
A single number.
Examples
x <- c(1, 1, 2, 2, 2) n_distinct(x) y <- c(3, 3, NA, 3, 3) n_distinct(y) n_distinct(y, na.rm = TRUE) # Pairs (1, 3), (2, 3), and (2, NA) are distinct n_distinct(x, y) # (2, NA) is dropped, leaving 2 distinct combinations n_distinct(x, y, na.rm = TRUE) # Also works with data frames n_distinct(data.frame(x, y))
na_if
Convert values to NA
CRAN · 1.2.1 · dplyr/man/na_if.Rd · 2026-05-07

This is a translation of the SQL command NULLIF. It is useful if you want to convert an annoying value to NA.

Aliases
na_if
Usage
na_if(x, y)
Arguments
x
Vector to modify
y
Value or vector to compare against. When x and y are equal, the value in x will be replaced with NA. y is [vctrs:theory-faq-coercion]cast to the type of x before comparison. y is [vctrs:theory-faq-recycling]recycled to the size of x before comparison. This means that y can be a vector with the same size as x, but most of the time this will be a single value.
Value
A modified version of x that replaces any values that are equal to y with NA.
Examples
# `na_if()` is useful for replacing a single problematic value with `NA` na_if(c(-99, 1, 4, 3, -99, 5), -99) na_if(c("abc", "def", "", "ghi"), "") # You can use it to standardize `NaN`s to `NA` na_if(c(1, NaN, NA, 2, NaN), NaN) # Because `na_if()` is an R translation of SQL's `NULLIF` command, # it compares `x` and `y` element by element. Where `x` and `y` are # equal, the value in `x` is replaced with an `NA`. na_if( x = c(1, 2, 5, 5, 6), y = c(0, 2, 3, 5, 4) ) # If you have multiple problematic values that you'd like to replace with # `NA`, then `replace_values()` is a better choice than `na_if()` x <- c(-99, 1, 4, 0, -99, 5, -1, 0, 5) replace_values(x, c(0, -1, -99) ~ NA) # You'd have to nest `na_if()`s to achieve this try(na_if(x, c(0, -1, -99))) na_if(na_if(na_if(x, 0), -1), -99) # If you'd like to replace values that match a logical condition with `NA`, # use `replace_when()` replace_when(x, x < 0 ~ NA) # If you'd like to replace `NA` with some other value, use `replace_values()` x <- c(NA, 5, 2, NA, 0, 3) replace_values(x, NA ~ 0) # `na_if()` is particularly useful inside `mutate()` starwars |> select(name, eye_color) |> mutate(eye_color = na_if(eye_color, "unknown")) # `na_if()` can also be used with `mutate()` and `across()` # to alter multiple columns starwars |> mutate(across(where(is.character), ~na_if(., "unknown")))
See also
[=coalesce]coalesce() to replace NAs with the first non-missing value. [=replace_values]replace_values() for making arbitrary replacements by value. [=replace_when]replace_when() for making arbitrary replacements using logical conditions.
near
Compare two numeric vectors
CRAN · 1.2.1 · dplyr/man/near.Rd · 2026-05-07

This is a safe way of comparing if two vectors of floating point numbers are (pairwise) equal. This is safer than using ==, because it has a built in tolerance

Aliases
near
Usage
near(x, y, tol = .Machine$double.eps^0.5)
Arguments
x, y
Numeric vectors to compare
tol
Tolerance of comparison.
Examples
sqrt(2) ^ 2 == 2 near(sqrt(2) ^ 2, 2)
nest_by
Nest by one or more variables
CRAN · 1.2.1 · dplyr/man/nest_by.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#experimentallifecycle-experimental.svgoptions: alt='[Experimental]'[Experimental] nest_by() is closely related to [=group_by]group_by(). However, instead of storing the group structure in the metadata, it is made explicit in the data, giving each group key a single row along with a list-column of data frames that contain all the other data. nest_by() returns a rowwise data frame, which makes operations on the grouped data particularly elegant. See vignette("rowwise") for more details.

Aliases
nest_by
Keywords
internal
Usage
nest_by(.data, ..., .key = "data", .keep = FALSE)
Arguments
.data
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
...
<[rlang:args_data_masking]data-masking> In group_by(), variables or computations to group by. Computations are always done on the ungrouped data frame. To perform computations on the grouped data, you need to use a separate mutate() step before the group_by(). Computations are not allowed in nest_by(). In ungroup(), variables to remove from the grouping.
.key
Name of the list column
.keep
Should the grouping columns be kept in the list column.
Details
Note that df |> nest_by(x, y) is roughly equivalent to html<div class="sourceCode">df |> group_by(x, y) |> summarise(data = list(pick(everything()))) |> rowwise() html</div> If you want to unnest a nested data frame, you can either use tidyr::unnest() or take advantage of reframe()s multi-row behaviour: html<div class="sourceCode">nested |> reframe(data) html</div>
Value
A rowwise data frame. The output has the following properties: The rows come from the underlying [=group_keys]group_keys(). The columns are the grouping keys plus one list-column of data frames. Data frame attributes are not preserved, because nest_by() fundamentally creates a new data frame. A tbl with one row per unique combination of the grouping variables. The first columns are the grouping variables, followed by a list column of tibbles with matching rows of the remaining columns.
Examples
# After nesting, you get one row per group iris |> nest_by(Species) starwars |> nest_by(species) # The output is grouped by row, which makes modelling particularly easy models <- mtcars |> nest_by(cyl) |> mutate(model = list(lm(mpg ~ wt, data = data))) models models |> summarise(rsq = summary(model)$r.squared) if (requireNamespace("broom", quietly = TRUE)) withAutoprint(\ # examplesIf # This is particularly elegant with the broom functions models |> summarise(broom::glance(model)) models |> reframe(broom::tidy(model)) \) # examplesIf # Note that you can also `reframe()` to unnest the data models |> reframe(data)
Custom sections
Lifecycle
nest_by() is not stable because [tidyr:nest]tidyr::nest(.by =) provides very similar behavior. It may be deprecated in the future.
Methods
This function is a generic, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. The following methods are currently available in loaded packages: [stage=render,results=rd]dplyr:::methods_rd("nest_by").
nest_join
Nest join
CRAN · 1.2.1 · dplyr/man/nest_join.Rd · 2026-05-07

A nest join leaves x almost unchanged, except that it adds a new list-column, where each element contains the rows from y that match the corresponding row in x.

Aliases
nest_joinnest_join.data.frame
Concepts
joins
Usage
nest_join(x, y, by = NULL, copy = FALSE, keep = NULL, name = NULL, ...) nest_joindata.frame( x, y, by = NULL, copy = FALSE, keep = NULL, name = NULL, ..., na_matches = c("na", "never"), unmatched = "drop" )
Arguments
x, y
A pair of data frames, data frame extensions (e.g. a tibble), or lazy data frames (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
by
A join specification created with [=join_by]join_by(), or a character vector of variables to join by. If NULL, the default, *_join() will perform a natural join, using all variables in common across x and y. A message lists the variables so that you can check they're correct; suppress the message by supplying by explicitly. To join on different variables between x and y, use a [=join_by]join_by() specification. For example, join_by(a == b) will match x$a to y$b. To join by multiple variables, use a [=join_by]join_by() specification with multiple expressions. For example, join_by(a == b, c == d) will match x$a to y$b and x$c to y$d. If the column names are the same between x and y, you can shorten this by listing only the variable names, like join_by(a, c). [=join_by]join_by() can also be used to perform inequality, rolling, and overlap joins. See the documentation at [=join_by]?join_by for details on these types of joins. For simple equality joins, you can alternatively specify a character vector of variable names to join by. For example, by = c("a", "b") joins x$a to y$a and x$b to y$b. If variable names differ between x and y, use a named character vector like by = c("x_a" = "y_a", "x_b" = "y_b"). To perform a cross-join, generating all combinations of x and y, see [=cross_join]cross_join().
copy
If x and y are not from the same data source, and copy is TRUE, then y will be copied into the same src as x. This allows you to join tables across srcs, but it is a potentially expensive operation so you must opt into it.
keep
Should the new list-column contain join keys? The default will preserve the join keys for inequality joins.
name
The name of the list-column created by the join. If NULL, the default, the name of y is used.
...
Other parameters passed onto methods.
na_matches
Should two NA or two NaN values match? "na", the default, treats two NA or two NaN values as equal, like %in%, [=match]match(), and [=merge]merge(). "never" treats two NA or two NaN values as different, and will never match them together or to any other values. This is similar to joins for database sources and to base::merge(incomparables = NA).
unmatched
How should unmatched keys that would result in dropped rows be handled? "drop" drops unmatched keys from the result. "error" throws an error if unmatched keys are detected. unmatched is intended to protect you from accidentally dropping rows during a join. It only checks for unmatched keys in the input that could potentially drop rows. For left joins, it checks y. For right joins, it checks x. For inner joins, it checks both x and y. In this case, unmatched is also allowed to be a character vector of length 2 to specify the behavior for x and y independently.
Value
The output: Is same type as x (including having the same groups). Has exactly the same number of rows as x. Contains all the columns of x in the same order with the same values. They are only modified (slightly) if keep = FALSE, when columns listed in by will be coerced to their common type across x and y. Gains one new column called name on the far right, a list column containing data frames the same type as y.
Examples
df1 <- tibble(x = 1:3) df2 <- tibble(x = c(2, 3, 3), y = c("a", "b", "c")) out <- nest_join(df1, df2) out out$df2
See also
Other joins: cross_join(), filter-joins, mutate-joins
Custom sections
Relationship to other joins
You can recreate many other joins from the result of a nest join: [=inner_join]inner_join() is a nest_join() plus [tidyr:unnest]tidyr::unnest(). [=left_join]left_join() is a nest_join() plus tidyr::unnest(keep_empty = TRUE). [=semi_join]semi_join() is a nest_join() plus a filter() where you check that every element of data has at least one row. [=anti_join]anti_join() is a nest_join() plus a filter() where you check that every element has zero rows.
Methods
This function is a generic, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. The following methods are currently available in loaded packages: [stage=render,results=rd]dplyr:::methods_rd("nest_join").
new_grouped_df
Low-level construction and validation for the grouped_df and rowwise_df classes
CRAN · 1.2.1 · dplyr/man/new_grouped_df.Rd · 2026-05-07

new_grouped_df() and new_rowwise_df() are constructors designed to be high-performance so only check types, not values. This means it is the caller's responsibility to create valid values, and hence this is for expert use only. validate_grouped_df() and validate_rowwise_df() validate the attributes of a grouped_df or a rowwise_df.

Aliases
new_grouped_dfvalidate_grouped_dfnew_rowwise_dfvalidate_rowwise_df
Keywords
internal
Usage
new_grouped_df(x, groups, ..., class = character()) validate_grouped_df(x, check_bounds = FALSE) new_rowwise_df(data, group_data = NULL, ..., class = character()) validate_rowwise_df(x)
Arguments
x
A data frame
groups
The grouped structure, groups should be a data frame. Its last column should be called .rows and be a list of 1 based integer vectors that all are between 1 and the number of rows of .data.
...
additional attributes
class
additional class, will be prepended to canonical classes.
check_bounds
whether to check all indices for out of bounds problems in grouped_df objects
Examples
# 5 bootstrap samples tbl <- new_grouped_df( tibble(x = rnorm(10)), groups = tibble(".rows" := replicate(5, sample(1:10, replace = TRUE), simplify = FALSE)) ) # mean of each bootstrap sample summarise(tbl, x = mean(x))
nth
Extract the first, last, or nth value from a vector
CRAN · 1.2.1 · dplyr/man/nth.Rd · 2026-05-07

These are useful helpers for extracting a single value from a vector. They are guaranteed to return a meaningful value, even when the input is shorter than expected. You can also provide an optional secondary vector that defines the ordering.

Aliases
nthfirstlast
Usage
nth(x, n, order_by = NULL, default = NULL, na_rm = FALSE) first(x, order_by = NULL, default = NULL, na_rm = FALSE) last(x, order_by = NULL, default = NULL, na_rm = FALSE)
Arguments
x
A vector
n
For nth(), a single integer specifying the position. Negative integers index from the end (i.e. -1L will return the last value in the vector).
order_by
An optional vector the same size as x used to determine the order.
default
A default value to use if the position does not exist in x. If NULL, the default, a missing value is used. If supplied, this must be a single value, which will be cast to the type of x. When x is a list , default is allowed to be any value. There are no type or size restrictions in this case.
na_rm
Should missing values in x be removed before extracting the value?
Details
For most vector types, first(x), last(x), and nth(x, n) work like x[[1]], x[[length(x)], and x[[n]], respectively. The primary exception is data frames, where they instead retrieve rows, i.e. x[1, ], x[nrow(x), ], and x[n, ]. This is consistent with the tidyverse/vctrs principle which treats data frames as a vector of rows, rather than a vector of columns.
Value
If x is a list, a single element from that list. Otherwise, a vector the same type as x with size 1.
Examples
x <- 1:10 y <- 10:1 first(x) last(y) nth(x, 1) nth(x, 5) nth(x, -2) # `first()` and `last()` are often useful in `summarise()` df <- tibble(x = x, y = y) df |> summarise( across(x:y, first, .names = "col_first"), y_last = last(y) ) # Selecting a position that is out of bounds returns a default value nth(x, 11) nth(x, 0) # This out of bounds behavior also applies to empty vectors first(integer()) # You can customize the default value with `default` nth(x, 11, default = -1L) first(integer(), default = 0L) # `order_by` provides optional ordering last(x) last(x, order_by = y) # `na_rm` removes missing values before extracting the value z <- c(NA, NA, 1, 3, NA, 5, NA) first(z) first(z, na_rm = TRUE) last(z, na_rm = TRUE) nth(z, 3, na_rm = TRUE) # For data frames, these select entire rows df <- tibble(a = 1:5, b = 6:10) first(df) nth(df, 4)
ntile
Bucket a numeric vector into n groups
CRAN · 1.2.1 · dplyr/man/ntile.Rd · 2026-05-07

ntile() is a sort of very rough rank, which breaks the input vector into n buckets. If length(x) is not an integer multiple of n, the size of the buckets will differ by up to one, with larger buckets coming first. Unlike other ranking functions, ntile() ignores ties: it will create evenly sized buckets even if the same value of x ends up in different buckets.

Aliases
ntile
Concepts
ranking functions
Usage
ntile(x = row_number(), n)
Arguments
x
A vector to rank By default, the smallest values will get the smallest ranks. Use [=desc]desc() to reverse the direction so the largest values get the smallest ranks. Missing values will be given rank NA. Use coalesce(x, Inf) or coalesce(x, -Inf) if you want to treat them as the largest or smallest values respectively. To rank by multiple columns at once, supply a data frame.
n
Number of groups to bucket into
Examples
x <- c(5, 1, 3, 2, 2, NA) ntile(x, 2) ntile(x, 4) # If the bucket sizes are uneven, the larger buckets come first ntile(1:8, 3) # Ties are ignored ntile(rep(1, 8), 3)
See also
Other ranking functions: percent_rank(), row_number()
order_by
A helper function for ordering window function output
CRAN · 1.2.1 · dplyr/man/order_by.Rd · 2026-05-07

This function makes it possible to control the ordering of window functions in R that don't have a specific ordering parameter. When translated to SQL it will modify the order clause of the OVER function.

Aliases
order_by
Usage
order_by(order_by, call)
Arguments
order_by
a vector to order_by
call
a function call to a window function, where the first argument is the vector being operated on
Details
This function works by changing the call to instead call [=with_order]with_order() with the appropriate arguments.
Examples
order_by(10:1, cumsum(1:10)) x <- 10:1 y <- 1:10 order_by(x, cumsum(y)) df <- data.frame(year = 2000:2005, value = (0:5) ^ 2) scrambled <- df[sample(nrow(df)), ] wrong <- mutate(scrambled, running = cumsum(value)) arrange(wrong, year) right <- mutate(scrambled, running = order_by(year, cumsum(value))) arrange(right, year)
percent_rank
Proportional ranking functions
CRAN · 1.2.1 · dplyr/man/percent_rank.Rd · 2026-05-07

These two ranking functions implement two slightly different ways to compute a percentile. For each x_i in x: cume_dist(x) counts the total number of values less than or equal to x_i, and divides it by the number of observations. percent_rank(x) counts the total number of values less than x_i, and divides it by the number of observations minus 1. In both cases, missing values are ignored when counting the number of observations.

Aliases
percent_rankcume_dist
Concepts
ranking functions
Usage
percent_rank(x) cume_dist(x)
Arguments
x
A vector to rank By default, the smallest values will get the smallest ranks. Use [=desc]desc() to reverse the direction so the largest values get the smallest ranks. Missing values will be given rank NA. Use coalesce(x, Inf) or coalesce(x, -Inf) if you want to treat them as the largest or smallest values respectively. To rank by multiple columns at once, supply a data frame.
Value
A numeric vector containing a proportion.
Examples
x <- c(5, 1, 3, 2, 2) cume_dist(x) percent_rank(x) # You can understand what's going on by computing it by hand sapply(x, function(xi) sum(x <= xi) / length(x)) sapply(x, function(xi) sum(x < xi) / (length(x) - 1)) # The real computations are a little more complex in order to # correctly deal with missing values
See also
Other ranking functions: ntile(), row_number()
pick
Select a subset of columns
CRAN · 1.2.1 · dplyr/man/pick.Rd · 2026-05-07

pick() provides a way to easily select a subset of columns from your data using [=select]select() semantics while inside a [rlang:args_data_masking]"data-masking" function like [=mutate]mutate() or [=summarise]summarise(). pick() returns a data frame containing the selected columns for the current group. pick() is complementary to [=across]across(): With pick(), you typically apply a function to the full data frame. With across(), you typically apply a function to each column.

Aliases
pick
Usage
pick(...)
Arguments
...
<[=dplyr_tidy_select]tidy-select> Columns to pick. You can't pick grouping columns because they are already automatically handled by the verb (i.e. [=summarise]summarise() or [=mutate]mutate()).
Details
Theoretically, pick() is intended to be replaceable with an equivalent call to tibble(). For example, pick(a, c) could be replaced with tibble(a = a, c = c), and pick(everything()) on a data frame with cols a, b, and c could be replaced with tibble(a = a, b = b, c = c). pick() specially handles the case of an empty selection by returning a 1 row, 0 column tibble, so an exact replacement is more like: html<div class="sourceCode">size <- vctrs::vec_size_common(..., .absent = 1L) out <- vctrs::vec_recycle_common(..., .size = size) tibble::new_tibble(out, nrow = size) html</div>
Value
A tibble containing the selected columns for the current group.
Examples
df <- tibble( x = c(3, 2, 2, 2, 1), y = c(0, 2, 1, 1, 4), z1 = c("a", "a", "a", "b", "a"), z2 = c("c", "d", "d", "a", "c") ) df # `pick()` provides a way to select a subset of your columns using # tidyselect. It returns a data frame. df |> mutate(cols = pick(x, y)) # This is useful for functions that take data frames as inputs. # For example, you can compute a joint rank between `x` and `y`. df |> mutate(rank = dense_rank(pick(x, y))) # `pick()` is also useful as a bridge between data-masking functions (like # `mutate()` or `group_by()`) and functions with tidy-select behavior (like # `select()`). For example, you can use `pick()` to create a wrapper around # `group_by()` that takes a tidy-selection of columns to group on. For more # bridge patterns, see # https://rlang.r-lib.org/reference/topic-data-mask-programming.html#bridge-patterns. my_group_by <- function(data, cols) group_by(data, pick( cols )) df |> my_group_by(c(x, starts_with("z"))) # Or you can use it to dynamically select columns to `count()` by df |> count(pick(starts_with("z")))
See also
[=across]across()
progress_estimated
Progress bar with estimated time.
CRAN · 1.2.1 · dplyr/man/progress_estimated.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#deprecatedlifecycle-deprecated.svgoptions: alt='[Deprecated]'[Deprecated] This progress bar has been deprecated since providing progress bars is not the responsibility of dplyr. Instead, you might try the more powerful https://github.com/r-lib/progressprogress package. This reference class represents a text progress bar displayed estimated time remaining. When finished, it displays the total duration. The automatic progress bar can be disabled by setting option dplyr.show_progress to FALSE.

Aliases
progress_estimated
Keywords
internal
Usage
progress_estimated(n, min_time = 0)
Arguments
n
Total number of items
min_time
Progress bar will wait until at least min_time seconds have elapsed before displaying any results.
Value
A ref class with methods tick(), print(), pause(), and stop().
Examples
p <- progress_estimated(3) p$tick() p$tick() p$tick() p <- progress_estimated(3) for (i in 1:3) p$pause(0.1)$tick()$print() p <- progress_estimated(3) p$tick()$print()$ pause(1)$stop() # If min_time is set, progress bar not shown until that many # seconds have elapsed p <- progress_estimated(3, min_time = 3) for (i in 1:3) p$pause(0.1)$tick()$print() p <- progress_estimated(10, min_time = 3) for (i in 1:10) p$pause(0.5)$tick()$print()
pull
Extract a single column
CRAN · 1.2.1 · dplyr/man/pull.Rd · 2026-05-07

pull() is similar to $. It's mostly useful because it looks a little nicer in pipes, it also works with remote data frames, and it can optionally name the output.

Aliases
pull
Usage
pull(.data, var = -1, name = NULL, ...)
Arguments
.data
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.
var
A variable specified as: a literal variable name a positive integer, giving the position counting from the left a negative integer, giving the position counting from the right. The default returns the last column (on the assumption that's the column you've created most recently). This argument is taken by expression and supports [rlang:topic-inject]quasiquotation (you can unquote column names and column locations).
name
An optional parameter that specifies the column to be used as names for a named vector. Specified in a similar manner as var.
...
For use by methods.
Value
A vector the same size as .data.
Examples
mtcars |> pull(-1) mtcars |> pull(1) mtcars |> pull(cyl) if (requireNamespace("dbplyr", quietly = TRUE) && requireNamespace("RSQLite", quietly = TRUE)) withAutoprint(\ # examplesIf # Also works for remote sources df <- dbplyr::memdb_frame(x = 1:10, y = 10:1, .name = "pull-ex") df |> mutate(z = x * y) |> pull() \) # examplesIf # Pull a named vector starwars |> pull(height, name)
Custom sections
Methods
This function is a generic, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour. The following methods are currently available in loaded packages: [stage=render,results=rd]dplyr:::methods_rd("pull").
recode
Recode values
CRAN · 1.2.1 · dplyr/man/recode.Rd · 2026-05-07

htmlhttps://lifecycle.r-lib.org/articles/stages.html#supersededlifecycle-superseded.svgoptions: alt='[Superseded]'[Superseded] recode() is superseded in favor of [=recode_values]recode_values() and [=replace_values]replace_values(), which are more general and have a much better interface. recode_factor() is also superseded, however, its direct replacement is not currently available but will eventually live in https://forcats.tidyverse.org/forcats. For creating new variables based on logical vectors, use [=if_else]if_else(). For even more complicated criteria, use [=case_when]case_when(). recode() is a vectorised version of [=switch]switch(): you can replace numeric values based on their position or their name, and character or factor values only by their name. This is an S3 generic: dplyr provides methods for numeric, character, and factors. You can use recode() directly with factors; it will preserve the existing order of levels while changing the values. Alternatively, you can use recode_factor(), which will change the order of levels to match the order of replacements.

Aliases
recoderecode_factor
Usage
recode(.x, ..., .default = NULL, .missing = NULL) recode_factor(.x, ..., .default = NULL, .missing = NULL, .ordered = FALSE)
Arguments
.x
A vector to modify
...
<[rlang:dyn-dots]dynamic-dots> Replacements. For character and factor .x, these should be named and replacement is based only on their name. For numeric .x, these can be named or not. If not named, the replacement is done based on position i.e. .x represents positions to look for in replacements. See examples. When named, the argument names should be the current values to be replaced, and the argument values should be the new (replacement) values. All replacements must be the same type, and must have either length one or the same length as .x.
.default
If supplied, all values not otherwise matched will be given this value. If not supplied and if the replacements are the same type as the original values in .x, unmatched values are not changed. If not supplied and if the replacements are not compatible, unmatched values are replaced with NA. .default must be either length 1 or the same length as .x.
.missing
If supplied, any missing values in .x will be replaced by this value. Must be either length 1 or the same length as .x.
.ordered
If TRUE, recode_factor() creates an ordered factor.
Value
A vector the same length as .x, and the same type as the first of ..., .default, or .missing. recode_factor() returns a factor whose levels are in the same order as in .... The levels in .default and .missing come last.
Examples
set.seed(1234) x <- sample(c("a", "b", "c"), 10, replace = TRUE) # `recode()` is superseded by `recode_values()` and `replace_values()` # If you are fully recoding a vector use `recode_values()` recode(x, a = "Apple", b = "Banana", .default = NA_character_) recode_values(x, "a" ~ "Apple", "b" ~ "Banana") # With a default recode(x, a = "Apple", b = "Banana", .default = "unknown") recode_values(x, "a" ~ "Apple", "b" ~ "Banana", default = "unknown") # If you are partially updating a vector and want to retain the original # vector's values in locations you don't make a replacement, use # `replace_values()` recode(x, a = "Apple", b = "Banana") replace_values(x, "a" ~ "Apple", "b" ~ "Banana") # `replace_values()` is easier to use with numeric vectors, because you don't # need to turn the numeric values into names y <- c(1:4, NA) recode(y, `2` = 20L, `4` = 40L) replace_values(y, 2 ~ 20L, 4 ~ 40L) # `recode()` is particularly confusing because it tries to handle both # full recodings to new vector types and partial updating of an existing # vector. With the above example, using doubles (20) rather than integers # (20L) results in a warning from `recode()`, because it thinks you are # doing a full recode and missed a case. `replace_values()` is type stable # on `y` and will instead coerce the double values to integer. recode(y, `2` = 20, `4` = 40) replace_values(y, 2 ~ 20, 4 ~ 40) # This also makes `replace_values()` much safer. If you provide # incompatible types, it will error. recode(y, `2` = "20", `4` = "40") try(replace_values(y, 2 ~ "20", 4 ~ "40")) # If you were trying to fully recode the vector and want a different output # type, use `recode_values()` recode_values(y, 2 ~ "20", 4 ~ "40") # And if you want to ensure you don't miss a case, use `unmatched`, which # errors rather than warns try(recode_values(y, 2 ~ "20", 4 ~ "40", unmatched = "error")) # --------------------------------------------------------------------------- # Lookup tables # If you were splicing an external lookup vector into `recode()`, you can # instead use the `from` and `to` arguments of `recode_values()` x <- c("a", "b", "a", "c", "d", "c") lookup <- c( "a" = "A", "b" = "B", "c" = "C", "d" = "D" ) recode(x, !!!lookup) recode_values(x, from = names(lookup), to = unname(lookup)) # `recode_values()` is much more flexible here because the lookup table # isn't restricted to just character values. We recommend using `tribble()` # to build your lookup tables. lookup <- tribble( ~from, ~to, "a", 1, "b", 2, "c", 3, "d", 4 ) recode_values(x, from = lookup$from, to = lookup$to) # --------------------------------------------------------------------------- # Factors # The factor method of `recode()` can generally be replaced with # `forcats::fct_recode()` x <- factor(c("a", "b", "c")) recode(x, a = "Apple") # forcats::fct_recode(x, "Apple" = "a") # `recode_factor()` does not currently have a direct replacement, but we # plan to add one to forcats. In the meantime, use a lookup table that # recodes every case, and then convert the `to` column to a factor. If you # define your lookup table in your preferred level order, then the conversion # to factor is straightforward! y <- c(3, 4, 1, 2, 4, NA) recode_factor( y, `1` = "a", `2` = "b", `3` = "c", `4` = "d", .missing = "M" ) lookup <- tribble( ~from, ~to, 1, "a", 2, "b", 3, "c", 4, "d", NA, "M" ) # `factor()` generates levels by sorting the unique values of `to`, which we # don't want, so we supply `levels = to` directly. Alternatively, use # `forcats::fct(to)`, which generates levels in order of appearance. lookup <- mutate(lookup, to = factor(to, levels = to)) recode_values(y, from = lookup$from, to = lookup$to)
See also
[=recode_values]recode_values()

버전 이력

RepositoryVersionPublishedFirst seenLast seenDocs
CRAN1.2.02026-02-032026-05-072026-05-07
CRAN1.1.42023-11-172026-05-072026-05-07
CRAN1.1.32023-09-032026-05-072026-05-07
CRAN1.1.22023-04-202026-05-072026-05-07
CRAN1.1.12023-03-222026-05-072026-05-07
CRAN1.1.02023-01-292026-05-072026-05-07
CRAN1.0.102022-09-012026-05-072026-05-07
CRAN1.0.92022-04-282026-05-072026-05-07
CRAN1.0.82022-02-082026-05-072026-05-07
CRAN1.0.72021-06-192026-05-072026-05-07
CRAN1.0.62021-05-052026-05-072026-05-07
CRAN1.0.52021-03-052026-05-072026-05-07
CRAN1.0.42021-02-022026-05-072026-05-07
CRAN1.0.32021-01-152026-05-072026-05-07
CRAN1.0.22020-08-182026-05-072026-05-07
CRAN1.0.12020-07-312026-05-072026-05-07
CRAN1.0.02020-05-292026-05-072026-05-07
CRAN0.8.52020-03-072026-05-072026-05-07
CRAN0.8.42020-01-312026-05-072026-05-07
CRAN0.8.32019-07-042026-05-072026-05-07
CRAN0.8.22019-06-292026-05-072026-05-07
CRAN0.8.12019-05-142026-05-072026-05-07
CRAN0.8.0.12019-02-152026-05-072026-05-07
CRAN0.8.02019-02-142026-05-072026-05-07
CRAN0.7.82018-11-102026-05-072026-05-07
CRAN0.7.72018-10-162026-05-072026-05-07
CRAN0.7.62018-06-292026-05-072026-05-07
CRAN0.7.52018-05-192026-05-072026-05-07
CRAN0.7.42017-09-282026-05-072026-05-07
CRAN0.7.32017-09-092026-05-072026-05-07
CRAN0.7.22017-07-212026-05-072026-05-07
CRAN0.7.12017-06-222026-05-072026-05-07
CRAN0.7.02017-06-092026-05-072026-05-07
CRAN0.5.02016-06-242026-05-072026-05-07
CRAN0.4.32015-09-012026-05-072026-05-07
CRAN0.4.22015-06-162026-05-072026-05-07
CRAN0.4.12015-01-142026-05-072026-05-07
CRAN0.4.02015-01-082026-05-072026-05-07
CRAN0.3.0.22014-10-112026-05-072026-05-07
CRAN0.3.0.12014-10-082026-05-072026-05-07
CRAN0.32014-10-042026-05-072026-05-07
CRAN0.22014-05-212026-05-072026-05-07
CRAN0.1.32014-03-152026-05-072026-05-07
CRAN0.1.22014-02-242026-05-072026-05-07
CRAN0.1.12014-01-292026-05-072026-05-07
CRAN0.12014-01-162026-05-072026-05-07
CRAN1.2.12026-05-292026-05-30
R-universe1.2.1.90002026-05-292026-05-30

보안

표시할 OSV 데이터가 없습니다.

문헌 신호

표시할 OpenAlex 데이터가 없습니다.