From 4aec38a4a7f23391a7c47b7f5967583bedefd4c0 Mon Sep 17 00:00:00 2001 From: msperlin Date: Tue, 15 Nov 2022 08:22:55 -0300 Subject: [PATCH] switched curl::has_internet by pingr::is_online() -- the first doesn't seem to work on restricted networks. Fixes #20 --- DESCRIPTION | 9 +++++---- NEWS.md | 4 ++++ R/yf_get.R | 2 +- inst/CITATION | 4 ++-- inst/WORDLIST | 1 + 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2b18e97..e369b97 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: yfR Title: Downloads and Organizes Financial Data from Yahoo Finance -Version: 1.0.3 +Version: 1.0.4 Authors@R: c(person("Marcelo", "Perlin", email = "marceloperlin@gmail.com", role = c("aut", "cre")), person("Nic", "Crane", role = "rev", comment = "Nic reviewed the package (v. 0.0.5) for @@ -14,11 +14,11 @@ Description: Facilitates download of financial data from Yahoo Finance = 4.0.0) Imports: stringr, - curl, tidyr, lubridate, furrr, @@ -33,10 +33,11 @@ Imports: quantmod (>= 0.4.20), magrittr, humanize, - methods + methods, + pingr License: MIT + file LICENSE LazyData: true -RoxygenNote: 7.2.1 +RoxygenNote: 7.2.2 Suggests: knitr, rmarkdown, diff --git a/NEWS.md b/NEWS.md index 02f6a77..4c7c166 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +## Version 1.0.4 (2022-11-15) -- bug fixes + +- switched curl::has_internet by pingr::is_online() -- the first doesn't seem to work on restricted networks. Fixes [#20](https://github.com/ropensci/yfR/issues/20) + ## Version 1.0.3 (2022-10-20) -- bug fixes - fixed bug on number of files at cache folder diff --git a/R/yf_get.R b/R/yf_get.R index a5b9c5e..0f6cffd 100644 --- a/R/yf_get.R +++ b/R/yf_get.R @@ -122,7 +122,7 @@ yf_get <- function(tickers, be_quiet = FALSE) { # check for internet - if (!curl::has_internet()) { + if (!pingr::is_online()) { stop("Can't find an active internet connection...") } diff --git a/inst/CITATION b/inst/CITATION index 27fcee4..4c19569 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -4,8 +4,8 @@ citEntry( entry = "Manual", title = "yfR: Downloads and Organizes Financial Data from Yahoo Finance", author = "Marcelo Perlin", - year = "2021", - note = "R package version 0.0.1", + year = "2022", + note = "R package version 1.0.4", url = "https://github.com/ropensci/yfR", textVersion = "Makes it easy to download financial data from Yahoo Finance , a vast repository of stock price data across multiple financial exchanges. The package offers a local caching system diff --git a/inst/WORDLIST b/inst/WORDLIST index 2b55556..1a8d5d0 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -48,3 +48,4 @@ ropensci dontrun donttest TSLA +pingr