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
Adding new vce options to existing command?Dear Statalist, I am currently working on a project that incorporates Regression Discontinuity in T…
xtreg by groupI have a pooled panel data. The model is Yi,t+j=aj*Xi,t +bi,t (fixed effect) +... To make it simple,…
Very large t-statisticsDear all, I am performing cluster robust WLS and fixed effects models on a relatively small dataset…
Problem in generating simple mean and graphDear all, It might be a silly a question but I've a simple problem in generating a mean variable. I…
Spost packageI use STATA 13.1 however I cannot find and isntall the spost packages . When I search for these pack…
Subscribe to:
Post Comments (Atom)
0 Response to How to Save a File After a String Value
Post a Comment