business-science / tidyquant

Bringing financial analysis to the tidyverse
https://business-science.github.io/tidyquant/
Other
852 stars 175 forks source link

Error with tidyquant 'cli_h1' is not an exported object from 'namespace:cli' #192

Closed Financebro1 closed 3 years ago

Financebro1 commented 3 years ago

Hey,

When i try to use certain commands i get Error:'cli_h1' is not an exported object from 'namespace:cli' Here is my code, and the error occurs when i try to use the tq_get?? Is tidyquant not working anymore, or is it a quick fix?

library(tidyverse) library(tidyquant)

options("getSymbols.warning4.0"=FALSE) options("getSymbols.yahoo.warning"=FALSE)

Downloading Apple price using quantmod

getSymbols("AAPL", from = '2017-01-01', to = "2018-03-01",warnings = FALSE, auto.assign = TRUE) head(AAPL)

class(AAPL) chart_Series(AAPL) chart_Series(AAPL['2017-12/2018-03']) tickers = c("AAPL", "NFLX", "AMZN", "K", "O")

getSymbols(tickers, from = "2017-03-01", to = "2017-04-01") prices <- map(tickers,function(x) Ad(get(x))) prices <- reduce(prices,merge) colnames(prices) <- tickers head(prices) class(prices)

aapl <- tq_get('AAPL', from = "2017-01-01", to = "2018-03-01", get = "stock.prices")

mdancho84 commented 3 years ago

Just ran this:

> tidyquant::tq_get("AAPL", from = "2017-01-01", to = "2018-03-01", get = 'stock.prices')
# A tibble: 291 x 8
   symbol date        open  high   low close    volume adjusted
   <chr>  <date>     <dbl> <dbl> <dbl> <dbl>     <dbl>    <dbl>
 1 AAPL   2017-01-03  29.0  29.1  28.7  29.0 115127600     27.5
 2 AAPL   2017-01-04  29.0  29.1  28.9  29.0  84472400     27.5
 3 AAPL   2017-01-05  29.0  29.2  29.0  29.2  88774400     27.6
 4 AAPL   2017-01-06  29.2  29.5  29.1  29.5 127007600     27.9
 5 AAPL   2017-01-09  29.5  29.9  29.5  29.7 134247600     28.2
 6 AAPL   2017-01-10  29.7  29.8  29.6  29.8  97848400     28.2
 7 AAPL   2017-01-11  29.7  30.0  29.6  29.9 110354400     28.4
 8 AAPL   2017-01-12  29.7  29.8  29.6  29.8 108344800     28.2
 9 AAPL   2017-01-13  29.8  29.9  29.7  29.8 104447600     28.2
10 AAPL   2017-01-17  29.6  30.1  29.6  30   137759200     28.4
# ... with 281 more rows
mdancho84 commented 3 years ago

What version of tidyquant are you running?

Financebro1 commented 3 years ago

Thanks for the quick response, i am using tidyquant_1.0.2

mdancho84 commented 3 years ago

Might be a bug. The cli package is used for some messaging, and there might be an issue there.

Financebro1 commented 3 years ago

Hey figured it out, an embarrassing problem, just had to update some of the other packages. Thank you for answering tho!

mdancho84 commented 3 years ago

Ah no worries. Happens all the time.