I have a dataframe including text and digit and I want to split, sort and combine text and digit in the separate columns. Kindly find the example dataset.
Text
7 LIFTING & SHORING
-00 General
-10 Jacking
-20 Shoring
8 LEVELING & WEIGHING
-00 General
-10 Weighing and Balancing
-20 Leveling
I need to get the below results:
dig Desc.
700 LIFTING & SHORING General
710 LIFTING & SHORING Jacking
720 LIFTING & SHORING Shoring
800 LEVELING & WEIGHING General
810 LEVELING & WEIGHING Weighing and Balancing
820 LEVELING & WEIGHING Leveling
I tried in R with for loop but I'm a newbie in r and can't find any solutions.
I appreciate your help.