After exporting an R database to Stata, the variables were like below, with "." in their names.
You used . in oldname, not newname. . is used in newname to indicate that the corresponding wildcard in oldname be skipped. E.g., "rename a*b* a.b*" removes what is between a and b; variable ausbvalue would be renamed abvalue.
After searching for a solution, i found one here To rename the variables to a valid name you can just use the code below to fix the var names.
forvalues i = 1/`c(k)' {
qui mata: st_isname(st_varname(`i')) ? 1 : st_varrename(`i', ustrtoname(st_varname(`i')))
}