I have a file with some codes and I want to add 2 columns which has fixed set of values in it. and I want to put: for each code in the file, put 2 columns with fixed set of values in it.
Using Reshape or tidyr or dplyr in R.
enter image description here For example: some_codes.csv has: " codes 123 234 r345 "
and i want to create 2 columns in this (set and category) which has fixed values.
codes set category 123 1 a 123 2 b 123 3 c 234 1 a 234 2 b 234 3 c 345 1 a 345 2 b 345 3 c