Description Usage Arguments Details Value See Also Examples
clean_downloads
removes files that get_info and get_prices
temporarily store when progress is interrupted while updating.
Because the temporarily stored data may become irrelvant over time,
clean_downloads removes these files so that get_info and
get_prices will download completely fresh sets of data for a given
data frame of companies.
1 | clean_downloads(x = qmjdata::companies)
|
x |
A data frame of companies. Must have a ticker column. |
The clean_downloads() function will also automatically remove any temporarily stored data for the S&P 500, with the stock ticker ^GSPC.
A logical vector Where the (2i-1)th and (2i)th element corresponds to whether or not a temporary financial and/or price file, respectively, was found and removed for the ith company provided.
For example, if AAPL was our 3rd company, for which we had not partially downloaded financial data, but did have temporary price data, the 5th and 6th elements of the logical vector would be FALSE and TRUE, respectively.
The last two indices refer to the S&P 500 temporary data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
## Without a specified data frame,
## clean_downloads defaults to the package
## provided data frame of comapnies.
clean_downloads()
## If we wanted to remove temporarily
## downloaded files for only some
## subset of our companies, or if we
## wanted to specify a modified data frame
## of companies.
clean_downloads(sub_comps)
## Fetch fresh data after removing old
## temporary files.
get_prices(sub_comps)
get_info(sub_comps)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.