New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not Depend (use Imports) #76

merged 4 commits into from Jul 30, 2017


None yet
2 participants
Copy link

zeehio commented Jan 5, 2017

This PR changes how the xlsx package is loaded in order to be able to use it from other packages without needing to Depend on it.

It also fixes the Cellblock.default S3 method, that was not exported in the NAMESPACE.

Packages that depend on xlsx can add xlsx to the Imports: section of the DESCRIPTION file. Then, they can use functions with the :: notation: xlsx::createWorkbook (recommended) or they can write import(xlsx) in the NAMESPACE file in order to make all the xlsx functions available to their package.

Packages that want to optionally depend on xlsx can add xlsx to the Suggests: section of the DESCRIPTION file and then in all functions that use xlsx they need to make sure xlsx is imported:

my_exporting_to_xlsx(mystuff) {
  if (!requireNamespace("xslx", quietly=TRUE)) {
    stop("Please install xlsx to use this function")

This PR is important in the xlsx package because it uses rJava, which is prone to installation errors in some platforms, so having a reliable and optional dependency on xlsx is very desirable.


This comment has been minimized.

Copy link
Contributor Author

zeehio commented Jan 19, 2017

This pull request is the final fix related to #36

zeehio added a commit to zeehio/condformat that referenced this pull request Jan 23, 2017

@colearendt colearendt merged commit 76460b6 into colearendt:develop Jul 30, 2017

@zeehio zeehio deleted the zeehio:develop branch Feb 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment