Reference All Series Matching String Comparison
Posted: Thu Jan 28, 2016 10:24 am
Hey,
I'm trying to delete all series that contain the suffix "01" Let's say I have a string variable: %suffix = "01"
1. How do I construct the right kind of loop?
Conceivably, I could use for %i x1 x2 ... but I'd have to input them all here manually, as far as I can tell.
I guess I'm looking for something a little less labor-intensive (I have 20 series, and not named as systematically as "x1, x2", more like casual syntax, i.e., exper, married, ect) Is there someway to loop all existing series, then narrow it down with an if clause, to only call d x1 if x1's series name contains the string: "01" ?
2. For this kind of comparison, I'd need to match the string of the series name to containing %suffix as part of its string value. I didn't see this kind of string operator in the eviews help section, but that wouldn't be the first time I missed something obvious. So question #2 is what string operators would be appropriate here? To reiterate, I'm targeting series like: "exper01", as opposed to a series whose actual name is "01"
In any event, please leave me a line,
Thank you
I'm trying to delete all series that contain the suffix "01" Let's say I have a string variable: %suffix = "01"
1. How do I construct the right kind of loop?
Conceivably, I could use for %i x1 x2 ... but I'd have to input them all here manually, as far as I can tell.
I guess I'm looking for something a little less labor-intensive (I have 20 series, and not named as systematically as "x1, x2", more like casual syntax, i.e., exper, married, ect) Is there someway to loop all existing series, then narrow it down with an if clause, to only call d x1 if x1's series name contains the string: "01" ?
2. For this kind of comparison, I'd need to match the string of the series name to containing %suffix as part of its string value. I didn't see this kind of string operator in the eviews help section, but that wouldn't be the first time I missed something obvious. So question #2 is what string operators would be appropriate here? To reiterate, I'm targeting series like: "exper01", as opposed to a series whose actual name is "01"
In any event, please leave me a line,
Thank you