Skip to main content

Questions tagged [cran]

For questions relating to the Comprehensive R Archive Network (CRAN), which serves as a central repository for R distributions and contributed packages. This tag is not for general R questions; use the [r] tag instead.

Filter by
Sorted by
Tagged with
238 votes
11 answers
335k views

How to select a CRAN mirror in R

I'm trying to install a package through the R prompt by doing the following: install.packages('RMySQL') But the output is as follows: --- Please select a CRAN mirror for use in this session --- ...
Jim Johnson's user avatar
  • 2,589
132 votes
3 answers
71k views

Set default CRAN mirror permanent in R

How can I set a specific CRAN mirror permanently in R? I want to set it permanently in my laptop so that when I do install.packages(), it won't ask me again which mirror to choose.
719016's user avatar
  • 10.3k
83 votes
2 answers
139k views

How to tell CRAN to install package dependencies automatically?

I develop a package in R and when I check and build it in my local computer it works properly. But when I tried it in CRAN, I get a package dependencies error. My package depends on two functions of ...
Mikael's user avatar
  • 985
72 votes
3 answers
10k views

checking CRAN incoming feasibility ... NOTE Maintainer

When I run R CMD check --as-cran on my package, the one note I still get is: checking CRAN incoming feasibility ... NOTE Maintainer:[my name] <my email> I can't seem to find a good ...
Benjamin's user avatar
  • 17.2k
62 votes
3 answers
42k views

Offline install of R package and dependencies

Suppose I need to install a number of packages on a (Linux) machine that does not have an internet connection. Let's say that I downloaded a copy of cran and burned it on a DVD that I bring to the ...
Jeroen Ooms's user avatar
  • 32.6k
58 votes
5 answers
37k views

Install a local R package with dependencies from CRAN mirror

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 ...
WoDoSc's user avatar
  • 2,608
47 votes
2 answers
39k views

Update a specific R package and its dependencies

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 ...
user3175783's user avatar
47 votes
1 answer
2k views

How to get an rmarkdown vignette for R package to escape CRAN warnings on Solaris and OSX

I have a couple of R packages on CRAN that have warnings against Solaris (and sometimes OSX) that are related to pandoc not being available for the vignette build. For example, here are the ggseas ...
Peter Ellis's user avatar
  • 5,814
39 votes
2 answers
10k views

R: apt-get install r-cran-foo vs. install.packages("foo")

When installing R packages (say mcmcpack in this example) under Ubuntu I have the choice between the following two methods of installation: # Let the distribution's packaging system take care of ...
knorv's user avatar
  • 49.7k
38 votes
5 answers
13k views

Warning "downloaded length != reported length" in installing packages from CRAN

Searching on stackoverflow questions, I found out this link: Error in file.download when downloading custom file . However, my case is a little bit different (I think): 1) I get this annoying ...
Davide Passaretti's user avatar
37 votes
3 answers
22k views

Check how many downloads a CRAN package has?

How can I get simple download metrics for an R package on CRAN? I recently released my own package on CRAN and I want to monitor it a bit.
Ben's user avatar
  • 21.1k
37 votes
2 answers
5k views

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

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/...
Tyler Rinker's user avatar
36 votes
1 answer
1k views

makePSOCKcluster hangs on win x64 after calling system

I am experiencing a hard to debug problem with makePSOCKcluster from the parallel package on R x64 on Windows. It does not happen on R i386 on Windows, nor on any OSX or Linux. Unfortunately it does ...
Jeroen Ooms's user avatar
  • 32.6k
35 votes
2 answers
12k views

R CMD check --as-cran warning

I am trying to do R CMD check before uploading my package to CRAN. R CMD check --as-cran "my package folder". However, it spits out this warning: "checking for unstated dependencies in examples ... ...
Tao Wang's user avatar
  • 351
32 votes
3 answers
5k views

How do I add a Changelog or NEWS file to my R package?

I have a package on CRAN that I would like to add a ChangeLog for, but I cannot find information anywhere on how to do this. I looked on the "Writing R Extensions" document that CRAN provides, but it ...
CephBirk's user avatar
  • 6,662
32 votes
4 answers
2k views

How to satisfy both CRAN and Github license file naming requirements

(NOTE: This question includes the word "license". But let's be clear: this question is not asking for licensing advice. It is asking how to simultaneously satisfy the file naming requirements of "...
Richard's user avatar
  • 59.5k
31 votes
2 answers
2k views

How can a test script inform R CMD check that it should emit a custom message?

I'm writing a R package (delftfews) here at office. we are using svUnit for unit testing. our process for describing new functionality: we define new unit tests, initially marked as DEACTIVATED; ...
mariotomo's user avatar
  • 9,648
30 votes
7 answers
74k views

Installing an R package from local unzipped folder

I am having difficulty installing an unzipped package on a Windows 7 computer without administrative privileges and no internet access. I am using the RGui (not RStudio). Right now I have an unzipped ...
Phantom Photon's user avatar
30 votes
2 answers
3k views

CRAN check warning: Dependence on R version '3.4.3' not with patchlevel 0

I am submitting my R package to CRAN, and am receiving a warning from the CRAN servers that does not appear when I run R CMD CHECK --as-cran locally on the package tarball prior to uploading to CRAN. ...
Pamela's user avatar
  • 325
30 votes
5 answers
5k views

Disable/suppress tcltk popup for CRAN mirror selection in R

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 ...
nsheff's user avatar
  • 3,173
30 votes
1 answer
3k views

Making non-ASCII data suitable for CRAN

I have some data that contains non-ASCII characters, that I want to include as an rda file in an R package. When I run an R CMD check on the package, I get a warning: Warning: found non-ASCII ...
Richie Cotton's user avatar
28 votes
2 answers
4k views

Using un-exported function from another R package?

I often use utility type functions from other packages that are un-exported: pkg:::fun(). I am wondering if I can use such a function within new functionality/scope in my own R package. What is the ...
pat shipan's user avatar
25 votes
1 answer
17k views

R `parallel` package does not exist on CRAN?

I tried to google "r package parallel" but I have not found it on CRAN. I also tried the following links, but they do not work: http://cran.r-project.org/web/packages/parallel/index.html http://cran....
Tomas's user avatar
  • 58.8k
25 votes
3 answers
3k views

Using a static (prebuilt) PDF vignette in R package

What is the proper way, to include a static PDF file as a "vignette" in a CRAN package as of R 3.0? The trick described in this document of using an empty stub Rnw does not seem to work in R 3.0. ...
Jeroen Ooms's user avatar
  • 32.6k
24 votes
1 answer
4k views

Computationally heavy R vignettes

I'm currently converting an JSS article, which uses knitr, to an R package vignette. However, I'm in doubt on the vignette placement, structure, and how I should handle the very long computation times ...
Anders Ellern Bilgrau's user avatar
23 votes
4 answers
7k views

Package dependencies when installing from source in R

Just confirming: If I distribute my R package as ZIP/TAR then installing the package will not automatically download/install dependencies because I have to set repos = NULL in install.packages() and ...
Suraj's user avatar
  • 36.2k
22 votes
5 answers
28k views

How to update all packages for a new R version quickly and easily?

Suppose I have R version 3.x.x installed, and I upgrade to version 4.x.x, is there any quick/easy way to install all the new versions of the libraries I had installed? Please assume all the packages ...
stevec's user avatar
  • 48.3k
22 votes
2 answers
4k views

Where to put package vignettes for CRAN submission?

From the Writing R Extensions Manual, I read that As from R 2.14.0 the preferred location for the Sweave sources is the subdirectory vignettes of the source packages, but for compatibility with ...
Gregor Thomas's user avatar
22 votes
4 answers
61k views

R: "make" not found when installing a R-package from local tar.gz

The R Package ConvCalendar is not on Cran repository anymore (see here). However, because I have intensively used this package for previous projects, it would be nice to have it installed on my ...
Caserio's user avatar
  • 472
22 votes
0 answers
4k views

Security issues with CRAN packages [closed]

[ Edit: June 2013 ] A paper has appeared on ArXiv describing this issue in greater detail, and suggesting some solutions: http://arxiv.org/abs/1303.4808. It will appear in the Journal of Statistical ...
Jeroen Ooms's user avatar
  • 32.6k
21 votes
3 answers
2k views

'LazyData' is specified without a 'data' directory error when submitting R package to CRAN

When I run devtools::check on my package locally, I don't get this error, but when I submit my package to CRAN, or when I run devtools::check_win_devel, I get this error: 'LazyData' is specified ...
s460's user avatar
  • 497
21 votes
3 answers
2k views

How to install and manage many versions of R packages

I am developing a framework for reproducible computing with R. One problem that I am struggling with is that some R code might run perfectly in version X.Y-Z of a package, but then why you try to ...
Jeroen Ooms's user avatar
  • 32.6k
20 votes
2 answers
9k views

Warning: replacing previous import ‘head’ when loading ‘utils’ in R

When loading the RTextTools package from CRAN, I get the following warnings: Warning messages: 1: replacing previous import ‘head’ when loading ‘utils’ 2: replacing previous import ‘tail’ when ...
Timothy P. Jurka's user avatar
20 votes
5 answers
6k views

Detecting geographic clusters

I have a R data.frame containing longitude, latitude which spans over the entire USA map. When X number of entries are all within a small geographic region of say a few degrees longitude & a few ...
jftuga's user avatar
  • 1,943
19 votes
3 answers
3k views

R 2.14 - detect packages without namespace

According to the R News for v2.14: All packages must have a namespace, and one is created on installation if not supplied in the sources. This means that any package without a ...
Suraj's user avatar
  • 36.2k
19 votes
4 answers
12k views

Names of R's available packages

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 ...
baptiste's user avatar
  • 76.7k
19 votes
5 answers
6k views

R check warning: Files in the 'vignettes' directory but no files in 'inst/doc'

Lately I get a warning for my vignette on Win R Development Version when doing a cran check. Files in the 'vignettes' directory but no files in 'inst/doc' This warning only appears with the Win ...
Steffen Moritz's user avatar
19 votes
5 answers
68k views

Installing packages onto R

For some reason I am suddenly not able to install packages in R (I have subsequently updated to the latest version of R and am running Windows 7). For example, if I type: install.packages('beeswarm') ...
user2407346's user avatar
19 votes
3 answers
2k views

Include non-CRAN package in CRAN package

The question is pretty simple. First: Is it possible to include a non-CRAN (or bioconductor, or omega hat) package in a CRAN package and actually use tools from that package in examples. If yes how ...
Tyler Rinker's user avatar
18 votes
6 answers
39k views

Installing all CRAN packages that are not already installed?

The following R commands will install all CRAN packages: availablePackages <- available.packages()[,1] install.packages(availablePackages) And the following command will list all installed ...
knorv's user avatar
  • 49.7k
18 votes
1 answer
4k views

What are the steps in submitting an R-package to CRAN and how long does each step take? [closed]

I have noticed that once submitted to incoming (ftp://cran.r-project.org/incoming) the package name receives the following suffixes .save, .pending and .noemail. Then, the package disappears from ...
user1134616's user avatar
17 votes
3 answers
2k views

Transferring maintainership of an R package on CRAN

I will be taking over the active development and maintaining of an R package on CRAN (of course with approval of the current maintainer). What are the necessary steps to make this happen / Should we ...
user3825755's user avatar
17 votes
6 answers
2k views

Online Tool for Cran checks

Even when I am afraid to be a bit off-topic, but I am not sure where else to ask this, sorry! I am developing my R-package using a Linux system, hence I can run the R CMD check --as-cran command ...
Daniel Fischer's user avatar
17 votes
5 answers
1k views

How to make a CRAN package to download data only once regardless of OS?

The CRAN policy limits R package size to 5 Mb, which is little for graphical applications such as mapping. There are multiple ways of handling the package size limitations, all of which come with ...
Mikko's user avatar
  • 7,680
17 votes
1 answer
764 views

Are there any R package repository management tools?

I'm creating a custom R package repository and would like to replicate the CRAN archive structure whereby old versions of packages are stored in the src/contrib/Archive/packageName/directory. I'd like ...
Erik Shilts's user avatar
  • 4,469
17 votes
1 answer
253 views

raise a NOTE exception during R CMD check

Is there any way I could raise my own NOTE exception from within the unit tests in the checking tests ... step of R CMD check? In general I would like to have a NOTE in 00check.log if database was not ...
jangorecki's user avatar
  • 16.6k
16 votes
7 answers
37k views

Error ".onLoad failed in loadNamespace() for 'tcltk'"

I have a general question about how to effectively load any kind of external package into R. I have found that many sources detailing this information are simply insufficient, but I will leave out ...
warship's user avatar
  • 2,984
15 votes
4 answers
6k views

Greatest distance between set of longitude/latitude points

I have a set of lng/lat coordinates. What would be an efficient method of calculating the greatest distance between any two points in the set (the "maximum diameter" if you will)? A naive way is to ...
Jeroen Ooms's user avatar
  • 32.6k
15 votes
1 answer
20k views

closing unused RODBC handle

I have been receiving a Warning Message: `historicalHourly <- importHistoricalHourly(startDatePast,endDatePast,Markets,location) [1] "Importing Hourly Data" [1] "Flag - Moving from ...
user2480137's user avatar
15 votes
2 answers
1k views

CRAN notes that files cannot be checked without ‘pandoc’ being installed

In doing final checks on a CRAN package submission, this NOTE comes up: * checking top-level files ... NOTE Files ‘README.md’ or ‘NEWS.md’ cannot be checked without ‘pandoc’ being installed. However,...
dshkol's user avatar
  • 1,228

1
2 3 4 5
18