Hi,
I've two questions, one is practical and the other educational. I'm following The Problem with Reshape FAQ. I have a set of variables following the naming convention var_2001 var_2002 var2_20012002 var_20032004. I would like to use the modified version of the code below to obtain my stubs for the reshape:
Ideally, I would like to delete everything after the _ sign but the code
won't work. My two questions are:
I've two questions, one is practical and the other educational. I'm following The Problem with Reshape FAQ. I have a set of variables following the naming convention var_2001 var_2002 var2_20012002 var_20032004. I would like to use the modified version of the code below to obtain my stubs for the reshape:
Code:
local stubs : subinstr local vars "_" "", all
Code:
local stubs : subinstr local vars "_*" "", all
- How to delete everything after the _ sign (including the _ sign)?
- What actually happens in subinstr local vars "_" "", all ? My first hunch would be to evaluate macro local newtext: substr(`text',1,length(`1')-3). Why do subinstr local vars?
Comment