Dear all,
I'm using Stata 15 and trying to split a string variable into different component which are comma-seperated.
I use the following Code:
Code:
set maxvar 5000
split lenders, parse(, )
However, some observations contain more than 5000 components. Followingly, i get the following error-message
no room to add more variables
Up to 5,000 variables are currently allowed, although you could reset the maximum using set maxvar; see help memory.
When I add the Limit option to my command (e.g. limit(2000) ) the command works fine but (logically) not all components are in distinct variables.

Therefore I would like to extract the first 5000 components and delete all extracted components from the original string to split my string into several lines.

Is there an option to remove the string components, which are in new variables, from the original string?

I hope my Question is clear. Any advice is highly appreciated.

Best Jay