Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Re: loop: how can I download CSV files and append it
From
"Joseph Coveney" <[email protected]>
To
<[email protected]>
Subject
Re: st: Re: loop: how can I download CSV files and append it
Date
Sun, 20 Mar 2011 16:34:55 +0900
Daniel Marcelino wrote:
Thanks for help Joseph, but with your proposed approach I still getting erro.
See a sample of web address.
[remainder omitted]
--------------------------------------------------------------------------------
Looking at one of the Web addresses you showed, the files are
semicolon-delimited, and not CSV files. So, change the -insheet- line
from
insheet using "`website`i''", names comma clear
to
insheet using "`website`i''", names delimiter(";") clear
and change the -outsheet- line the same way (I didn't catch that in your R
code),
from
outsheet using ap.csv, comma names quote
to
outsheet using ap.csv, delimiter(";") names quote
Note that the column names in those files aren't valid Stata variable names, and
so Stata will automatically assign them valid variable names and place the
original column headers text into the variables' variable labels.
Joseph Coveney
P.S. Also, change the last line of the last post
from
The local macros' contents are retrieved in the second loop as
`website'`i' . . .
to
The local macros' contents are retrieved in the second loop as
`website`i'' . . .
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/