Clear Filters
Clear Filters

Is there any matlab equivalent of spread, gather functions of r tidyr package????

10 views (last 30 days)
Is there any matlab equivalent of spread, gather functions of r tidyr package????
  2 Comments
Star Strider
Star Strider on 24 May 2019
From the tidyr (link) website:
There are two fundamental verbs of data tidying:
  • gather() takes multiple columns, and gathers them into key-value pairs: it makes “wide” data longer.
  • spread() takes two columns (key & value), and spreads into multiple columns: it makes “long” data wider.

Sign in to comment.

Answers (1)

François Stevens
François Stevens on 9 Jul 2020
Have a look at the "stack" and "unstack" functions :

Categories

Find more on Measurements and Feature Extraction in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!