0

I have data something like this (Stakeflow colleagues support to get this. Thank you all.

A B C D
Name-1 Name-1 Name-1
Name-2 Name-2
Name-3 Name-3
Name-4
Name-5 Name-5 Name-5

Now I want to get data something like this from above result. Can anyone help me to on this please? I need to get other data cuts one of them is this in which I Stuck.

CT OG.Name
B Name-1
B Name-5
C Name-3
D Name-1
D Name-2
D Name-5
Syed
  • 55
  • 4
  • `df1 <- tidyr::pivot_longer(df, cols = B:D)` and then you can remove `NA` or empty values if needed. – Ronak Shah Dec 10 '20 at 10:42
  • @ Ronak Shah Thanks a lot. I was looking for the solution that I can replicate for big data. I can nit fixed the columns. Can you suggest the changes accordingly ? – Syed Dec 10 '20 at 10:49
  • Can you provide sample of your actual data preferably using `dput` ? – Ronak Shah Dec 10 '20 at 10:53

0 Answers0