0

So I have the following dataset schema.

Type | Quarter | Revenue

How do I turn the Quarter column into different column names (such as Q2, Q3) and have the respective revenue values attached to it? I want it to look like this below

Type | Q2 Rev | Q3 Rev

Thanks!

  • 1
    Do you want to [reshape data from long to wide in R](https://stackoverflow.com/questions/5890584/how-to-reshape-data-from-long-to-wide-format)? – Rui Barradas Apr 10 '20 at 03:59
  • [See here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on making an R question that folks can help with. That includes a sample of data, all necessary code, and a clear explanation of what you're trying to do and what hasn't worked. Right now it's hard to understand what exactly you're trying to do and where you may have run into trouble – camille Apr 10 '20 at 04:05

0 Answers0