Hello. This should be rather easy for folks here, but I am stymied.
I have a rather simple dataset; 4 columns, 1 row:
county state fips year
1 Alachua_County FL 12001 2015
I am wanting to save this file using the contents within county[1], i.e., "Alachua_County." I am using the following commands:
local county "county[1]"
di `county'
save "C:/.../`county'.dta", replace
However, this does not work. What I get is a file saved as county[1].dta. What I am wanting is a file saved as Alachua_County.dta.
Thanks in advance for your assistance.
Related Posts with How to Save a File After a String Value
metan Hazard Ratio log scaleHello, I am running cox regression and I want to make forest plot of my hazard ratios using metan. I…
Creating new variables based on information from three other variablesI’m having some difficulty creating a new variable from three others. All variables are of binary ty…
Generating new variables based on information in other observations in datasetI'm working with some NCAA football player data. I've reached a bit of a difficult (for me) data cle…
Residual Variance Estimators: Calculating HC0 & HC1Hi everyone, This may seem like a very simple question but could someone please share the command f…
Within estimator singleton Code: sysuse auto split make encode make1, g(id) xtset id xtreg price displacement, fe Assume that …
Subscribe to:
Post Comments (Atom)
0 Response to How to Save a File After a String Value
Post a Comment