clean_downloads: Removes downloaded temporary files.

View source: R/clean_downloads.R

clean_downloadsR Documentation

Removes downloaded temporary files.

Description

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.

Usage

clean_downloads(x = qmj::companies_r3k16)

Arguments

x

A data frame of companies. Must have a ticker column.

Details

The clean_downloads() function will also automatically remove any temporarily stored data for the S&P 500, with the stock ticker ^GSPC.

Value

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.

See Also

get_prices

get_info

Examples

clean_downloads()


anttsou/qmj documentation built on Feb. 19, 2025, 5:25 p.m.