similar to: Custom per-package options passed down via library() ?

Displaying 20 results from an estimated 10000 matches similar to: "Custom per-package options passed down via library() ?"

2012 Apr 07
4
Display instruction text on package load
I'm currently working on a new package for R that interfaces with an API. Most of the package's functionality requires users to supply an access key that allows the package to work with the API. I want to display text immediately upon loading the package that instructs/reminds users to enter their access key before attempting to do anything (as the package won't really work without
2020 Oct 11
3
Installing bioconduction packages in connection with loading an R package
Dear all, My gRbase package imports functionality from the bioconductor packages graph, Rgraphviz and RBGL. To make installation of gRbase easy, I would like to have these bioconductor packages installed in connection with installation of gRbase, but to do so the user must use setRepositories() to make sure that R also installs packages from bioconductor. Having to call setRepositories causes
2011 Jun 23
1
Class not found when search in .onLoad
Hi, I am facing with a strange behaviour of isClass and extends when these are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing my package from doing some object initializations at a proper place (i.e. in .onLoad). Suppose one defines two S4 classes in a package, and that one needs to check the inheritance between these two when loading the package (e.g. to validate slots
2005 Aug 27
2
Writing R-extensions
G'day all, After reading through "Writing R Extensions", Version 2.1.1 (2005-06-20), I thought the the following points might need clarifications or corrections. (I checked that these comments also hold for "Writing R Extensions", Version 2.2.0.) 1) When I ran "package.skeleton" recently, I noticed that the DESCRIPTION file and an entry `type'. This
2006 Apr 13
1
Wishlist: 'quietly' argument for .onAttach() / .First.li b()
From: Prof Brian Ripley > > On Thu, 13 Apr 2006, Peter Ruckdeschel wrote: > > > Hi R-devels, > > > > in "Writing R extensions" as well as in the help > > to .onAttach(), you mention that one could > > use this function to issue a start-up message/banner > > for the package. > > > > My little wish for Easter: > > > > a
2006 Apr 13
4
Wishlist: 'quietly' argument for .onAttach() / .First.lib()
Hi R-devels, in "Writing R extensions" as well as in the help to .onAttach(), you mention that one could use this function to issue a start-up message/banner for the package. My little wish for Easter: a 'quietly'-type argument for .onAttach() / .First.lib() which is passed through by functions require() and library() respectively, and by means of which one could optionally
2011 Jan 26
1
Problem with "setMethod" in R package
Dear all, My apologies for re-posting this question, but I have not found any solution to my problem so far. I also think that my post may have been overseen due to the posting time and high traffic on this list. I experience a problem in implementing a S4 class in a package and would appreciate your help in this matter. The class is implemented using Rcpp, which works well. I then extend
2011 Sep 14
1
[Q] Package NS Hook Lint NOTE
Have a question about the following NOTEs appearing on CRAN checks: > .onLoad calls: > require(methods) > > Package startup functions should not change the search path. > See section ?Good practice? in ?.onAttach. For years, I have had the following in my S4-requiring packages. ##--------------------------------------------------------------------- .onLoad <-
2012 Mar 29
3
r-forge build failure bafflement
I am attempting to build a package on r-forge and running into a weird error. I have been in correspondence with the R-forge admins and am turning to r-devel on the remote chance that someone might have a guess as to what is going wrong or a suggestion about further diagnostics/experiments I could try ... The package seems to build fine on my system(s) with R CMD build --compact-vignettes
2024 Mar 06
1
Never exporting .__global__ and .__suppressForeign__?
Hello, (Dear Richard, I hope you don't mind being Cc:'d on this thread in R-devel. This is one of the ways we can prevent similar problems from happening in the future.) Sometimes, package authors who use both exportPattern('.') and utils::globalVariables(...) get confusing WARNINGs about undocumented exports: https://stat.ethz.ch/pipermail/r-package-devel/2024q1/010531.html I
2011 Jul 17
1
NAMESPACE
> Packages without explicit ?NAMESPACE? files will have a default one created at build or INSTALL time, > so all packages will have namespaces. A consequence of this is that ?.First.lib? functions need to be > renamed, usually as ?.onLoad? but sometimes as ?.onAttach?. Couldn't R simply regard .First.lib as the appropriate function to save many packages from being needlessly changed?
2004 Jul 11
2
library( ) and verbose=
The Hmisc package has in its .First.lib function a verbose argument, which I thought was the way to allow users to suppress certain messages, by issuing library(Hmisc, verbose=FALSE). But I see that library( ) does not pass verbose to .First.lib. The default for verbose in Hmisc is TRUE because .First.lib prints some important information about masked functions. What is the best way to fix
2009 Mar 31
4
what is the preferred method to create a package local variable?
for the moment, I'm using: .onAttach <- function(libname, pkgname) { .bbg.db.conn <<- dbConnect(dbDriver("PostgreSQL"), user="blah","blah") } .onUnload <- function(libpath) { dbDisconnect(.bbg.db.conn) } which results in a hidden global variable in the global environment. I would prefer to make the assignment only in the package namespace.
2013 Jul 26
1
How to best implement package options?
Dear developeRs, I have a package, pls, that implements package options. The users are supposed to use a function pls.options() to manipulate them. If a user changes the options, they are stored in .GlobalEnv. I was recently informed that this is against current CRAN submission policies, so I need to change that. I have looked at several different packages that implement package options, and
2004 Mar 16
2
Documentation on how to put classes and methods in packages with namespace?
Documentation on how to put classes and methods in packages with namespace? How should I define my classes and methods in "dynamicGraph"??? (That is - Can some one point me to the documentation on how to put classes and methods in packages with a namespace? ) Currently it is done by the code below. This gives problems, when a workspace with a "dynmaicGraph" is
2015 May 09
1
PATCH: library(..., quietly=TRUE) still outputs "Loading required package: ..." (forgot to pass down 'quietly')
Calling library(..., quietly=TRUE) may still output: Loading required package: <other pkg> in some cases, e.g. > library("R.utils", quietly=TRUE) Loading required package: R.methodsS3 [...] I traced this to base:::.getRequiredPackages2(), which forgets to pass 'quietly' to an internal library() call: if (!attached) { if (!quietly)
2006 Oct 12
2
Problem loading SpareM package
Hi, I have just installed R 2.4.0 and when I try to load SpareseM, I get the following error message library(SparseM) Package SparseM (0.71) loaded. To cite, see citation("SparseM") Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : in 'SparseM' methods specified for export, but none defined: as.matrix.csr, as.matrix.csc,
2013 Jun 07
1
cannot load pbdMPI package after compilation
Hello, I try to install pbdMPI. Compilation successful, but load fails with segfault. Is anyone can help me? R version 3.0.0 pbdMPI version 0.1-6 Intel compiler version 13.1.1 OpenMPI version 1.6.4-1 CPU Intel x86_64 # R CMD INSTALL pbdMPI_0.1-6.tar.gz .. .... checking for gcc... icc -std=gnu99 checking whether the C compiler works... yes checking for C compiler default output file name...
2011 Jul 22
1
Problem with creating default NAMESPACE on FreeBSD
After building and installing R-devel from 21/07/2011 on FreeBSD 9.0-CURRENT (amd64), starting R gives the following warning: [..snip..] Beim Start - Warnmeldung: package 'datasets' in options("defaultPackages") was not found This happens with all versions after 14/07/2011. I think it is related to NEWS Sat, 16 Jul 2011 CHANGES IN R-devel PACKAGE INSTALLATION Packages without
2004 Dec 15
1
Lazy loading errors building its package in a chroot
Trying to build its_1.0.4 in a chroot environment to update the corresponding Debian package, I get * Installing *source* package 'its' ... ** R ** inst ** save image Loading required package: Hmisc Hmisc library by Frank E Harrell Jr Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview') to see overall documentation. NOTE:Hmisc no longer redefines [.factor to drop