cran

Offline Installation of R packages

梦想的初衷 提交于 2019-11-29 00:46:34
My institute uses proxy server, and no one is able to install packages in a usual way. (i.e downloading binary file from CRAN and then choosing Mirro and the installing etc etc). I am able to install packages if I use internet outside of my institute. So, I am looking for an offline way to install packages. Please provide a detailed solution, I have just started using R. Before writing this question I did look at this earlier asked question but did not quite understand the terms which have been used here (they are very direct). I am a newbie, please provide me a detailed solution. Offline

Disable/suppress tcltk popup for CRAN mirror selection in R

拟墨画扇 提交于 2019-11-28 17:34:33
问题 My question is similar to a question previously posted but never really answered here: Disable GUI, graphics devices in R I do not like the R tcltk popups for CRAN mirror selection. They also pop up to choose a package when searching for help on a function in two packages. Is there any way to disable these windows without disabling X11 completely? I still want plot() commands to work as normal, but disable the little select menus that take forever to load over a remote connection. For example

Install a local R package with dependencies from CRAN mirror

限于喜欢 提交于 2019-11-28 17:25:40
I have built an R package, i.e. I have the mypackage.tar.gz file. This package depends on several other packages, all downloadable and installable from any CRAN mirror. Now I want to install this package on a system where the dependencies are not yet installed, and I would like that the dependencies will be downloaded and installed automatically when I install my package. I tried: install.packages("mypackage.tar.gz",type="source",dependencies=TRUE,repos="http://a.cran.mirror") but it searches for mypackage.tar.gz on the mirror (and obviously it does not find), while if I set repos=NULL it

How can I load dependencies in an R package?

半腔热情 提交于 2019-11-28 14:27:11
I am developing an R package where this is available in the DESCRIPTIONS file Imports: dplyr, ggplot2, ncdf4 And I have an example function where I use the third dependency testFun <- function(file, lat, long){ ncfname <- file.path(file,fsep = .Platform$file.sep) xfile <- nc_open(ncfname) #Opens the NetCDF file lat <- ncvar_get(xfile, 'lat') #Extracts all latitudes ...Calculations return(XYZ) } When I Build and Reload the package, and I run the function, it could not find function "nc_open" . BUT, it works when I replace it with ncdf4::nc_open Am I supposed to prefix packagename:: to every

How do I get rmarkdown 1.2 with Microsoft R Open 3.3.2

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 08:49:51
I am using RStudio 1.0.136 with Microsoft R Open 3.3.2 When I do File --> New File --> R Markdown... it says rmarkdown 1.2 is required but 1.1 is available And Check that getOption("repos") refers to a CRAN repository that contains the needed package versions And getOption("repos") gives me this: CRAN "https://mran.revolutionanalytics.com/snapshot/2016-11-01" CRANextra "http://www.stats.ox.ac.uk/pub/RWin" Where do I go from here? One of the things we do with MRO (and other MS R distributions) is to point the default repository to a static point-in-time snapshot, for the purposes of

NOTE in R CRAN Check: No repository set, so cyclic dependency check skipped

假如想象 提交于 2019-11-28 06:44:55
As of R 3.1.0 I get the following R check: * checking package dependencies ... NOTE No repository set, so cyclic dependency check skipped I tried this advice: https://twitter.com/phylorich/status/431911660698083328 No go. I put the line options(repos="http://cran.rstudio.com/") in a .Rprofile in the package root directory. Still get the Note. Also section 1.3.1 of Writing R Extensions states: Some Windows users may need to set environment variable R_WIN_NO_JUNCTIONS to a non-empty value. The test of cyclic declarations33in DESCRIPTION files needs repositories (including CRAN) set: do this in ~

Update a specific R package and its dependencies

时间秒杀一切 提交于 2019-11-28 06:16:00
I have around 4000 R packages installed in my system (a server) and most of them are outdated because they were built before R-3.0.0. Now I know update.packages(checkBuilt=TRUE, ask=FALSE) would update all my packages but that's too slow. The thing is the users do not use most of the packages and now and then they ask me to update a package (say fields) they'd use. Now if I run install.packages("fields") it would only update the package fields but not the package maps even if fields depends on maps. Thus when I try to load the package fields: library("fields") I get an error message Error:

list all functions on CRAN

Deadly 提交于 2019-11-28 02:01:23
Suppose I'm trying to run a script of unknown origin, and one of the functions is from a package that is not loaded by the script (an oversight, maybe it was loaded in the .Rprofile of the person who wrote it). How can I find in which package this function resides? There's some information compiled on CRAN, that doesn't require the user to download/install all R packages locally; however as far as I could tell it only gives access to the DESCRIPTION files. RSiteSearch, and its web equivalent, seem to access an online database of all CRAN packages, where presumably a list of all functions would

R CRAN, install library Rcpp fails after R3.2 upgrade

浪子不回头ぞ 提交于 2019-11-28 00:57:32
I upgraded from R-3.1 to R-3.2. OK ( Standard upgrade) But this upgrade seems to have lost all the installed packages ( ggplot2, quantmod, Rcpp among dozens and dozens of others). So installed many from the RStudio tools menu option. Most were successful. But problem with Rcpp (when installing as dependency from ggplot2). The same issue occurs when installing package data.table : Warning in install.packages : unable to move temporary installation ‘C:\Users\euclid\Documents\R\win-library\3.2\file40fc19bc2752\colorspace’ to ‘C:\Users\euclid\Documents\R\win-library\3.2\colorspace’ package ‘Rcpp’

Names of R's available packages

帅比萌擦擦* 提交于 2019-11-27 22:03:14
I'm eager to know, how many package names on CRAN have two, three, N characters? which combinations have not yet been used ("unpoppler") how many package names use full-caps, or camelCase? how many package names end in 2? I think it might reveal some interesting facts. Edit: bonus points for animated graphics showing the time-evolution of CRAN packages. A better way than scraping a web page to get the names of packages is to use the available.packages() function and process those results. available.packages() returns a matrix contains details of all packages available (but is filtered by