I have several groupings to process which I need to do summary statistics for each except that each group has few a few extraneous members. As such, I'm working on a separate page from my main page with all relevant series groups, and looking to drop the extraneous series. We'll say that the series I want to summarize are defined as those starting with "USE" and invalid series start with anything else.
Likewise, for the data to be summarized properly, I actually need to convert any zero values to NAs.
So I figure, I can loop through the group, convert the values as necessary to NA, and then check each name and see if I should delete it from the grouping.
I can't. the [group].@seriesname(!i) even when assigned to a temp value does not get recognized as a series.
currently I've got the NA code commented out because solving the failure to drop "BADNAME" from the group should provide me enough insight to solve my NA problem.
Code: Select all
for !i = 1 to g_sc_sqft.@count
%j = @left(g_sc_sqft.@seriesname(!i), 3) '# getting the preamble
%k = g_sc_sqft.@seriesname(!i) '# getting the whole name of the series
logmsg %j %k '# We'll say %j %k is "BAD" and "BADNAME" respectively
' smpl s_all if {k%}=0
' {%k}=NA
' smpl s_all
if %j <> "USE" then '# "USE01" "USE02" "USE03" do not enter this loop.
logmsg "here" '# we do infact reach this point with "BAD"
g_sc_sqft.drop {%k} '# neither %k or {%k} give the desired result, an indirect reference to the series "BADNAME"
endif
next
