1

I am trying to put the following date into a different format but running into a few errors.

I am trying to create a matrix where the data will hopefully look as the following

user113156
  • 6,761
  • 5
  • 35
  • 81
  • Thanks for the suggestion! I am working though it now but when I apply; `test <- reshape(specificity, idvar = "Region", timevar = "Sector", direction = "wide")` I get errors – user113156 Mar 03 '18 at 22:53
  • 1
    You need to start with a `data.frame` instead of a `matrix` - `reshape(data.frame(specificity), idvar="Region", timevar="Sector", direction="wide")` – thelatemail Mar 03 '18 at 23:08
  • Thanks so much!, been working on this all night and I finally have the results I want :) thanks!! – user113156 Mar 03 '18 at 23:10
  • 1
    It might be worth going back to the import of your data and making sure you have a `data.frame` right from the start, with distinct numeric and character columns. Might make it easier to work with generally – thelatemail Mar 03 '18 at 23:12

0 Answers0