I have some Stata datasets which were written by R; R was saving arrays, and so it gave many of the variables names that include the array index, eg
However, these names are not valid Stata names, so while I can -summarize- _all, I can't refer to any of them individually:
Obviously, this is a problem R created, and if necessary I can go back for an updated dataset, but it would be a lot easier for me if I could just use these files I have. Is there a way to refer to a variable other than by name - eg, by number?
Jeph
Code:
. ds beta[1,1] beta[3,1] beta[5,1] beta[1,2] beta[3,2] beta[5,2] beta0[1] beta0[3] beta0[5] beta[2,1] beta[4,1] beta[6,1] beta[2,2] beta[4,2] beta[6,2] beta0[2] beta0[4] beta0[6]
Code:
. rename beta[1,1] beta11 syntax error Syntax is rename oldname newname [, renumber[(#)] addnumber[(#)] sort ...] rename (oldnames) (newnames) [, renumber[(#)] addnumber[(#)] sort ...] rename oldnames , {upper|lower|proper} r(198);
Jeph
Comment