Displaying 20 results from an estimated 5000 matches similar to: "Wishlist: 'quietly' argument for .onAttach() / .First.lib()"
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
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.
2020 Jun 23
4
Restrict package to load-only access - prevent attempts to attach it
Hi,
I'm developing a package whose API is only meant to be used in other
packages via imports or pkg::foo(). There should be no need to attach
this package so that its API appears on the search() path. As a
maintainer, I want to avoid having it appear in search() conflicts by
mistake.
This means that, for instance, other packages should declare this
package under 'Imports' or
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".
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")
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 <-
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
2006 May 12
0
New versions for the distr-family of packages, and a new package "startupmsg"
We would like to announce the availability on CRAN of new versions
of our packages "distr" (1.7), "distrEx" (0.4-3), "distrSim" (1.7), "distrTEst" (1.7),
as well as a new package "startupmsg" [all of them require R >= 2.2.0]
-----------------------------------------------------------------------------------------
************ new package
2006 May 12
0
New versions for the distr-family of packages, and a new package "startupmsg"
We would like to announce the availability on CRAN of new versions
of our packages "distr" (1.7), "distrEx" (0.4-3), "distrSim" (1.7), "distrTEst" (1.7),
as well as a new package "startupmsg" [all of them require R >= 2.2.0]
-----------------------------------------------------------------------------------------
************ new package
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
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
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
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
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 <-
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
2008 Jan 07
3
Finding windows DLLs
The XML package relies on libxml2.dll (e.g., bundled with the CRAN
binary) installed in library/XML/libs. Unfortunately,
c:/WINDOWS/system32/libxml2.dll will be found and loaded before
this.
Is there any programatic solution?
Thanks,
Martin
--
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold