-2

I have a dataset in below format

enter image description here

I am trying to get an output in below format using R. The product names for each sales order must be split in columns. There are multiple SalesOrderNumbers and for each of the the numbers of products could be n.

enter image description here

Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
  • 2
    Possible duplicate of https://stackoverflow.com/questions/5890584/how-to-reshape-data-from-long-to-wide-format and https://stackoverflow.com/questions/11322801/transpose-reshape-dataframe-without-timevar-from-long-to-wide-format to be specific. – Ronak Shah Jun 05 '20 at 06:47

1 Answers1

-1

This is a "convert data frame from long to wide format" question. There are many resources on that. The post "How to reshape data from long to wide format" will give you directions on how to do it. Here is another source https://www.datacamp.com/community/tutorials/long-wide-data-R.

Please try that, first. If you have any trouble with it, we will be glad to help you.

Jan
  • 4,974
  • 3
  • 26
  • 43