Good afternoon,
I am trying to rename a group of variables within a program, and -rename group- fails:
But when I copy exactly the same -rename- command from command line and out of my program, it works:
Has anybody seen anything like this before, and does anybody know what is going on here and how to fix the problem?
I am trying to rename a group of variables within a program, and -rename group- fails:
Code:
- if !missing("`generate'") rename __quantile* `generate'* = if !missing("myqs") rename __quantile* myqs* __quantile ambiguous abbreviation ------------------------------------------------------------------------------------------- end qtiles --- r(111); . des Contains data from C:\Program Files (x86)\Stata15\ado\base/a/auto.dta obs: 74 1978 Automobile Data vars: 7 13 Apr 2016 17:45 size: 3,256 (_dta has notes) ---------------------------------------------------------------------------------------------------------- storage display value variable name type format label variable label ---------------------------------------------------------------------------------------------------------- price int %8.0gc Price weight int %8.0gc Weight (lbs.) __quantile0 double %10.0g __quantile_25 double %10.0g __quantile_5 double %10.0g __quantile_75 double %10.0g __quantile1 double %10.0g ---------------------------------------------------------------------------------------------------------- Sorted by: Note: Dataset has changed since last saved.
Code:
. rename __quantile* myqs* . des Contains data from C:\Program Files (x86)\Stata15\ado\base/a/auto.dta obs: 74 1978 Automobile Data vars: 7 13 Apr 2016 17:45 size: 3,256 (_dta has notes) ---------------------------------------------------------------------------------------------------------- storage display value variable name type format label variable label ---------------------------------------------------------------------------------------------------------- price int %8.0gc Price weight int %8.0gc Weight (lbs.) myqs0 double %10.0g myqs_25 double %10.0g myqs_5 double %10.0g myqs_75 double %10.0g myqs1 double %10.0g ---------------------------------------------------------------------------------------------------------- Sorted by: Note: Dataset has changed since last saved.
Comment