Is there a way to pull the value of a string variable into the part of a collect export command so that the value is part of the filename? In other words, say I had a string variable name with the value alpha in all records in the dataset, could I insert alpha into the filename?
The reason that I ask is that I have a collect export within a loop and I'd like one word in the filename change, depending on the value the loop iteration (1,2,3, ...).
Related Posts with Inserting value of a string in a filename when exporting
-egen, xtile- works in Stata 11, 12, 13, but generates an error message in Stata 15... Is this situation supposed to not occur?Good afternoon, The -egen, xtile- command/function from the egenmore package by Nick Cox is exhibit…
Matching households food consumption with individualDear Stata list, I have household level 24 hours food consumption data (by Menu) including ingredie…
Generate mean based on condition, where condition is based on variableHello dear Statalist-experts, I have a daily panel-dataset in long format, containing, among other …
Creating observation ( based on "/" from another obs) Code: +-------------------------------------------------------------------+ | …
Direct effects in mediationHello, I have run a mediation model using SEM to test whether the relationship between the predicto…
Subscribe to:
Post Comments (Atom)
0 Response to Inserting value of a string in a filename when exporting
Post a Comment