similar to: Restrict package to load-only access - prevent attempts to attach it

Displaying 20 results from an estimated 6000 matches similar to: "Restrict package to load-only access - prevent attempts to attach it"

2020 Jul 17
0
Restrict package to load-only access - prevent attempts to attach it
Hi Henrik, A bit late, but you can take a look at smbache's {import} package [1] in case you didn't know it. I believe it does what you are describing. [1] https://github.com/smbache/import I?aki On Tue, 23 Jun 2020 at 22:21, Henrik Bengtsson <henrik.bengtsson at gmail.com> wrote: > > Hi, > > I'm developing a package whose API is only meant to be used in other
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
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.
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
2013 Jan 15
1
Can not load Rcmdr
I am getting the error message: > library(Rcmdr) Loading required package: car Loading required package: MASS Loading required package: nnet Error : .onAttach failed in attachNamespace() for 'Rcmdr', details: call: structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), class = "tclObj") error: [tcl] invalid command name "image".
2009 Oct 22
1
Error in link in Rd file stops package installation
With a pretty recent version of R 2.11.0 (devel,unstable, svn 50178) on Linux I could not install version 1.5-8 of zoo (the current on on CRAN): % R-devel CMD INSTALL -l Rlib3 zoo * installing *source* package 'zoo' ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices converting help for package 'zoo' finding
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 <-
2005 Jan 27
7
getting package version inside .First.lib
Greetings - Is it possible, inside .First.lib, to find out the version number of the package that is being loaded? If only one version of the package has been installed, we could scan the DESCRIPTION file, something like .First.lib <- function(lib, pkg) { library.dynam("spatstat", pkg, lib) dfile <- system.file("DESCRIPTION", package="spatstat")
2013 Jun 10
1
Rcmdr seit heute nicht mehr ladbar
Wenn man ihn mal braucht ist er tot. folgende Fehlermeldung ereilt mich seit heute beim starten des R Commander auf dem Mac: > library(Rcmdr) Lade n?tiges Paket: car Lade n?tiges Paket: MASS Lade n?tiges Paket: nnet Error : .onAttach in attachNamespace() f?r 'Rcmdr' fehlgeschlagen, Details: ? Aufruf: structure(.External(.C_dotTclObjv, objv), class = "tclObj") ? Fehler: [tcl]
2013 Jan 13
1
Loading circular package from Rprofile.site
Hi, I installed "circular" package and I wanted to load it automatically when R starts up, so I added the following lines in file Rprofile.site, .First <- function() library(circular) When R starts up, it gives me the following error: ---------- Loading required package: boot Loading required package: graphics Loading required package: stats Error : .onAttach failed in
2004 Jun 22
2
function not in load table
Hi, I apologize for this often/old question. I found some hints but couldn't solve the problem so far. I have C functions (incl. the header files) as well as the R wrapper functions which I want to use for faster calculations. These functions are included in a R package. The installation process seems to be ok (no errors). I also can load the package without errors. But when I call the
2010 Feb 15
1
R-Commander plug-in difficulties
Hi All, I have recently created an Rcmdr plugin package and it passed all the checks and was uploaded to CRAN. I then downloaded it from CRAN and tried running it from my local R program and received this error: ... Error in f(libname, pkgname) : could not find function "getRcmdr" Error in library(pkg, character.only = TRUE) : .First.lib failed for 'RcmdrPlugin.MAc' In my
2009 Sep 14
1
loading a package .Rda file at package load time
Hi, I have seen the answer to this sometime before but I just can't find it again - pointers appreciated. I have a package that contains some data.frames saved as .Rda files in the data/ directory. When the package is loaded I would like to have them be available in the workspace (without the user having to explicitly load them using data(...)). If my package does not use a NAMESPACE, I can
2004 Jun 10
3
Package installation
Hi all, I'm very new to R. I have installed R 1.9.0 on Linux (Fedora). Now I got an self-made package comprising R functions as well as C-Code which are used in several R functions. I installed the package without any error (see install log below). Then, I checked in /usr/lib/R/library if the package izbi exists and it exists. But whenever I try to load the library on the command line I
2003 May 22
3
How to avoid function masking
Hi All, I've been working on updating the 'genetics' package. As a consequence of the upgrade, .First.lib() looks like: .First.lib <- function(libname, pkgname) { if (!require(combinat)) warning("Unable to load 'combinat' library. Function `diseq.ci' will fail.") require(gregmisc) genotype <-
2005 Dec 08
1
Loading namespaces
I'm creating a package for my own use that uses some S4 classes but no methods. I have a file called NAMESPACE it contains the line: exportClasses("foo") and at the top of the R file I have setClass("foo", representation(x="numeric") and the line: .onLoad<-function(libname,pkgname) When I run R CMD check I get Syntax error in the only R file. If I
2020 Jan 10
2
SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()
I'd like to pick up this thread started on 2019-04-11 (https://hypatia.math.ethz.ch/pipermail/r-devel/2019-April/077632.html). Modulo all the other suggestions in this thread, would my proposal of being able to disable forked processing via an option or an environment variable make sense? I've prototyped a working patch that works like: > options(fork.allowed = FALSE) >