0

Here is a sample set of mine:

Date / Time      12:15 AM   12:30 AM
January 1, 2010  408.48     403.20
January 2, 2010  438.72     435.36

This is what I'd look it to look like:

January 1, 2010 12:15   408.48
January 1, 2010 12:30   403.20
January 2, 2010 12:15   438.72
January 2, 2010 12:30   435.36

This isn't a pure transformation between wide/long data, so I'm really have trouble reshaping the data to fit this format. Ultimately, I'd like to order this data oldest --> newest (Jan 1 12:15 --> Jan 2 12:30)

Any help would be greatly appreciated. Thank you.

  • 1
    You should show how you are entering that data from your file. (I suspect you will need help with that before you can sensibly attempt a wid to long transformation.) – IRTFM Oct 14 '18 at 22:23
  • Welcome to Stack Overflow! Could you make your problem reproducible by sharing a sample of your data so others can help (please do not use `str()`, `head()` or screenshot)? You can use the [`reprex`](https://reprex.tidyverse.org/articles/articles/magic-reprex.html) and [`datapasta`](https://cran.r-project.org/web/packages/datapasta/vignettes/how-to-datapasta.html) packages to assist you with that. See also [Help me Help you](https://speakerdeck.com/jennybc/reprex-help-me-help-you?slide=5) & [How to make a great R reproducible example?](https://stackoverflow.com/q/5963269) – Tung Oct 15 '18 at 04:38

0 Answers0