I use a macro to define the URL for a dataset downloaded from Harvard Dataverse using copy:
This returns a "varlist not allowed" error, but if I enclose the call to the macro in double quotation marks, it works fine:
I copy other datasets from URLs input as macros without double quotation marks, so I'd appreciate an explanation for why Stata needs them here.
Code:
local unvotingdata "https://dataverse.harvard.edu/api/access/datafile/2839238?format=original" copy `unvotingdata' "RawVotingdata.dta", replace
Code:
local unvotingdata "https://dataverse.harvard.edu/api/access/datafile/2839238?format=original" copy "`unvotingdata'" "RawVotingdata.dta", replace