0

Table

How would you go about making one plot that contains the numbers in each element on the y-axis and the years on the x-axis? Each row (ID) is a set data that should be connected with a line or something similar.

WoeIs
  • 1,083
  • 1
  • 15
  • 25
  • 8
    I would try the `tidyverse` using `gather`. Then `ggplot2` – Roman May 30 '18 at 09:10
  • @Jimbou: I tried using the ggplot2 but I couldn't quite get it to work. I only have experience plotting with two columns, not multiple like in this case. – WoeIs May 30 '18 at 09:12
  • 2
    @Woels I have given the hint in my first comment. So google for "transform data from wide to long" . If you need more specific help, provide some data using `dput()` – Roman May 30 '18 at 09:16
  • Possible duplicate: https://stackoverflow.com/questions/22264744/draw-histograms-per-row-over-multiple-columns-in-r?noredirect=1&lq=1 – zx8754 May 30 '18 at 09:26
  • @Jimbou: I tried using the gather function, but it also gathers the IDs and when i try to use the ggplot function, it doesn't display anything? – WoeIs May 30 '18 at 09:45
  • 1
    @WoeIs I repeat my comment above, If you need more specific help, provide some data using `dput()` rather posting pictures of the data. – Roman May 30 '18 at 10:03

0 Answers0