1

I am new coder and learning R. I am trying to solve the following. I have a following list like

Id    Stage  Duration

xxi       S1     23

xxii      S1     34

xxiii     S2     21

xxi       S2     29

xxiii     S3     15

xxi       S4     10

xxi       S5     12

I want an output like

Id   FS  duration_FS  SS  duration_SS   TS   duration_TS   FS   duration_FS

xxi  S1           23  S2           29   S4            10    S5        12

xxii S1           34  NA           NA   NA            NA    NA        NA

xxiiiS2           21  S3           15   NA            NA    NA        NA

Request for help.

Sotos
  • 51,121
  • 6
  • 32
  • 66
  • 2
    Can you please the further details like how you decide `FS`, `SS` etc. – Saurabh Chauhan Aug 28 '18 at 12:06
  • @SaurabhChauhan.. FS is first stage, SS is second stage. This is actually data from duration of a project. Here I am having a data like a project_id follows some stages of project phases. Example Id xxxi follows first stage as S1, second stage as S2, third stage as S4 so on. – Bidisha Mukherjee Aug 28 '18 at 12:32

0 Answers0