Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An R package to flexible rearrange, reshape and aggregate data

License

NotificationsYou must be signed in to change notification settings

hadley/reshape

Repository files navigation

R-CMD-checkCodecov test coverage

Status

Lifecycle: superseded

reshape2 is superseded: only changes necessary to keep it on CRAN will be made. We recommend usingtidyr instead.

Introduction

Reshape2 is a reboot of the reshape package. It's been over five years since the first release of reshape, and in that time I've learned a tremendous amount about R programming, and how to work with data in R. Reshape2 uses that knowledge to make a new package for reshaping data that is much more focused and much much faster.

This version improves speed at the cost of functionality, so I have renamed it toreshape2 to avoid causing problems for existing users. Based on user feedback I may reintroduce some of these features.

What's new inreshape2:

  • considerably faster and more memory efficient thanks to a much betterunderlying algorithm that uses the power and speed of subsetting to thefullest extent, in most cases only making a single copy of the data.

  • cast is replaced by two functions depending on the output type:dcastproduces data frames, andacast produces matrices/arrays.

  • multidimensional margins are now possible:grand_row andgrand_col havebeen dropped: now the name of the margin refers to the variable that hasits value set to (all).

  • some features have been removed such as the| cast operator, and theability to return multiple values from an aggregation function. I'mreasonably sure both these operations are better performed by plyr.

  • a new cast syntax which allows you to reshape based on functionsof variables (based on the same underlying syntax as plyr):

  • better development practices like namespaces and tests.

  • the functionmelt now names the columns of its returned data frameVar1,Var2, ...,VarN instead ofX1,X2, ...,XN.

  • the argumentvariable.name ofmelt replaces the old argumentvariable_name.

Initial benchmarking has shownmelt to be up to 10x faster, pure reshapingcast up to 100x faster, and aggregatingcast() up to 10x faster.

This work has been generously supported by BD (Becton Dickinson).

About

An R package to flexible rearrange, reshape and aggregate data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors12


[8]ページ先頭

©2009-2026 Movatter.jp