[R] tidyquant error downloading symbols for Index

Sparks, John James jspark4 at uic.edu
Mon Aug 7 02:10:18 CEST 2017


Hi R Helpers,

I recently tried to take advantage of the ability to download all the
tickers in the S&P 500 using the functionality of tidyquant, but it threw
an error.

For summary, the set of commands that I ran was

library(tidyquant)
tq_index_options()
tq_index("SP500")
sessionInfo()


R feedback including error message and sessionInfo are provided below.

Guidance would be appreciated.

--John J. Sparks, Ph.D.


> library(tidyquant)
Loading required package: lubridate

Attaching package: ‘lubridate’

The following object is masked from ‘package:base’:

    date

Loading required package: PerformanceAnalytics
Loading required package: xts
Loading required package: zoo

Attaching package: ‘zoo’

The following objects are masked from ‘package:base’:

    as.Date, as.Date.numeric


Package PerformanceAnalytics (1.4.3541) loaded.
Copyright (c) 2004-2014 Peter Carl and Brian G. Peterson, GPL-2 | GPL-3
http://r-forge.r-project.org/projects/returnanalytics/


Attaching package: ‘PerformanceAnalytics’

The following object is masked from ‘package:graphics’:

    legend

Loading required package: quantmod
Loading required package: TTR
Version 0.4-0 included new data defaults. See ?getSymbols.
Learn from a quantmod author:
https://www.datacamp.com/courses/importing-and-managing-financial-data-in-r
Loading required package: tidyverse
Loading tidyverse: ggplot2
Loading tidyverse: tibble
Loading tidyverse: tidyr
Loading tidyverse: readr
Loading tidyverse: purrr
Loading tidyverse: dplyr
Conflicts with tidy packages
-----------------------------------------------------
as.difftime(): lubridate, base
date():        lubridate, base
filter():      dplyr, stats
first():       dplyr, xts
intersect():   lubridate, base
lag():         dplyr, stats
last():        dplyr, xts
setdiff():     lubridate, base
union():       lubridate, base

Attaching package: ‘tidyquant’

The following object is masked from ‘package:dplyr’:

    as_tibble

The following object is masked from ‘package:tibble’:

    as_tibble

There were 14 warnings (use warnings() to see them)
> tq_index_options()
[1] "RUSSELL1000" "RUSSELL2000" "RUSSELL3000" "DOW"         "DOWGLOBAL"
[6] "SP400"       "SP500"       "SP600"       "SP1000"
> tq_index("SP500")
Getting holdings for SP500
# A tibble: 0 x 0
Warning message:
In tq_index("SP500") : Error at SP500 during download.
Error: .onLoad failed in loadNamespace() for 'rJava', details:
  call: fun(libname, pkgname)
  error: No CurrentVersion entry in Software/JavaSoft registry! Try
re-installing Java and make sure R and Java have matching architectures.

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
 [1] tidyquant_0.5.3               dplyr_0.7.2
 [3] purrr_0.2.3                   readr_1.1.1
 [5] tidyr_0.6.3                   tibble_1.3.3
 [7] ggplot2_2.2.1                 tidyverse_1.1.1
 [9] quantmod_0.4-10               TTR_0.23-2
[11] PerformanceAnalytics_1.4.3541 xts_0.10-0
[13] zoo_1.8-0                     lubridate_1.6.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.12     cellranger_1.1.0 plyr_1.8.4       bindr_0.1
 [5] forcats_0.2.0    tools_3.3.2      jsonlite_1.5     nlme_3.1-131
 [9] gtable_0.2.0     lattice_0.20-35  pkgconfig_2.0.1  rlang_0.1.1
[13] psych_1.7.5      curl_2.8.1       parallel_3.3.2   haven_1.1.0
[17] bindrcpp_0.2     xml2_1.1.1       httr_1.2.1       stringr_1.2.0
[21] hms_0.3          grid_3.3.2       glue_1.1.1       R6_2.2.2
[25] Quandl_2.8.0     readxl_1.0.0     foreign_0.8-69   modelr_0.1.1
[29] reshape2_1.4.2   magrittr_1.5     scales_0.4.1     rvest_0.3.2
[33] assertthat_0.2.0 mnormt_1.5-5     colorspace_1.3-2 stringi_1.1.5
[37] lazyeval_0.2.0   munsell_0.4.3    broom_0.4.2



More information about the R-help mailing list