Splitting a single column into multiple observation using R
问题 I am working on HCUP data and this has range of values in one single column that needs to be split into multiple columns. Below is the HCUP data frame for reference : code label 61000-61003 excision of CNS 0169T-0169T ventricular shunt The desired output should be : code label 61000 excision of CNS 61001 excision of CNS 61002 excision of CNS 61003 excision of CNS 0169T ventricular shunt My approach to this problem is using the package splitstackshape and using this code library(data.table)