r-package

Can't download data from Yahoo Finance using Quantmod in R

感情迁移 提交于 2019-11-26 12:19:29
问题 I\'m trying to download data from Yahoo using this code: library(quantmod) getSymbols(\"WOW\", auto.assign=F) This has worked for me in the past in every occasion except now, 5 days before my group assignment is due. Except now I receive this error: Error in download.file(paste(yahoo.URL, \"s=\", Symbols.name, \"&a=\", from.m, : cannot download all files In addition: Warning message: In download.file(paste(yahoo.URL, \"s=\", Symbols.name, \"&a=\", from.m, : URL \'https://ichart.finance.yahoo

Creating a local R package repository

只愿长相守 提交于 2019-11-26 09:19:00
问题 I would like to create a local R package repository such that users in my company can install packages from it and the system admins can update the local repo periodically. Access to the CRAN mirrors is currently denied. Is there a simple way to do this? 回答1: Yes, either a copy of CRAN or a repo with local packages is easy to set up. Presumably you want this for Windows so do this: Create a top-level directory on your webserver, say R/ Create the usual hierarchy in there: R/bin/windows

How to load packages in R automatically?

懵懂的女人 提交于 2019-11-26 04:38:23
问题 Could you suggest me a way for loading packages in R automatically? I mean, I want to start a session in R without needing to use library(\'package name\') several times. Suppose I downloaded all packages I\'ll want to use the next time I start R. 回答1: Put library(foo) in your .Rprofile file or set R_DEFAULT_PACKAGES : see ?Rprofile ... In particular (because ?Rprofile is long and potentially intimidating): If you want a different set of packages than the default ones when you start, insert a