Displaying 20 results from an estimated 7000 matches similar to: "[Q] Package NS Hook Lint NOTE"
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 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
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
2014 Feb 05
1
R CMD check, NOTEs, & S4-dependent packages
As I was running "R CMD check" on one of my older packages
(matlab), I was attempting to fix one of the NOTEs which
bitches about attempting to change the search path using
require().
In my case, I am repeating a package dependency for "methods"
package in my .onLoad() function. Can this scenario (based
on something B. Ripley discussed many years ago) no longer
occur? Just
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
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.
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
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
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".
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 Jan 23
0
setMethod call in package code using Rcpp
Dear all,
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 the
class with R functions, adding them as methods with a call to
setMethod(...). When I do this outside the package (after loading the
package with "library(...)"), everything works smoothly.
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?
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
2010 Aug 24
1
save() object w/o all of the loaded environment
I have two packages, one that does the actual work (SC) and the other
a Tcl/Tk UI (SCUI) that invokes methods within the former. Within the
SCUI's invocation method, I save an object returned from SC, the
results of a long-running method.
Now the object is completely described by the SC package. Unfortunately,
any attempt to load the object (in a fresh R session) fails as below.
R>
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
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
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
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
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