Displaying 20 results from an estimated 6000 matches similar to: "loadNamespace tries to load an optional dependency from a required dependency"
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
2009 Jun 24
2
loadNamespace and useDynLib
I am considering a package with a namespace (Rgraphviz from Bioc). I
essentially want to have some error handling for loading the dll,
something like wrapping it into tryCatch or similar (reason: see
below). Right now I am loading the dynamic libraries by useDynLib in
my NAMESPACE file. When I look at the code from loadNamespace, I have
the impression that what I want is impossible
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
2012 Mar 09
0
.conflicts.OK no longer working regardless of export(.conflicts.OK) due to "stoplist"
Hi,
in (at least) R v2.14.2 and R v2.15.0 alpha, '.conflicts.OK' is not
exported and hence to seen by library().
DETAILS:
In R-devel thread '[Rd] Suggestion: Not having to export .conflicts.OK
in name spaces' on Mar 17-22, 2010
[https://stat.ethz.ch/pipermail/r-devel/2010-March/057017.html] it was
discussed that one had to export '.conflicts.OK' in the namespace,
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 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 <-
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
2012 May 24
1
New S3 methods for optional package
Hi,
I have asked this question before, but the solution I ended up with (see
below) creates a note when running R CMD check. So I am trying again...
I am developing a package B that, among other things, also offers some
extra S3-methods for functions in package A if the user has installed A.
I do not want to list A under Depends of B, as the dependency list of A
is rather long, and most
2013 Mar 04
1
R broken after upgrade to 2.15.3 (Ubuntu 12.10, 64bit)
Hi,
I am using R on Ubuntu 12.10 (64bit). This morning, Ubuntu's software
updater automatically installed updates to R's base system (version
2.15.3; via the CRAN PPA). Now R does not work anymore. Here is what I
get when I simply enter "R" on the shell prompt:
bodenhof FUKUOKA~>R
cannot find system Renviron
Error : .onLoad failed in loadNamespace() for 'utils',
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?
2013 Nov 06
1
How to do package cleanup: hooks .onUnload, R_unload_mylib, .onDetach are not called on quit
Hi,
it seems that the package hooks .onLoad and its C++ pendant
R_unload_mylib are actually not called when R quits, but only when
explicitly calling detach('package:mylib', unload = TRUE).
Maybe this is platform specific, I'm on Ubuntu 13.10 - R 3.0.2 (see below).
* is there a mechanism that a package can use to effectively do some
cleanup on standard exit, such as calling
2004 Mar 16
0
VS: Documentation on how to put classes and methods in packages with namespace?
> -----Oprindelig meddelelse-----
> Fra: Jens Henrik Badsberg
> Sendt: 16. marts 2004 11:37
> Til: 'r-help@stat.math.ethz.ch'
> Emne: 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
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
2013 Oct 03
1
check warning with .onLoad() and setClass()
Hi
I am writing a package in which I define a new class in the .onLoad()
hook:
,----
| .onLoad <- function(libname, pkgname) {
| setClass(
| "inDrak",
| representation(
| init = "SpatialGridDataFrame"
| ),
| contains = "simObj"
| )
| }
`----
The class "simObj" is defined in the package, which
2013 May 08
1
Namespace/inheritance problem in S4 methods for a union class
Hi,
I started this post on bioc-devel but this seems to be more general:
https://stat.ethz.ch/pipermail/bioc-devel/2013-May/004311.html
See reproducible example from Martin below.
Thank you.
Renaud
---------- Forwarded message ----------
From: Martin Morgan <mtmorgan at fhcrc.org>
Date: 7 May 2013 19:55
Subject: Re: [Bioc-devel] ExpressionSet and LumiBatch: inheritance problem
in S4
2011 Oct 28
3
R CMD check and error in an \Sexpr in an Rd file
Hi,
another Rd related issue I encountered is that if an error occurs in an
\Sexpr in an Rd file, then on get the following error:
* checking for portable compilation flags in Makevars ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking examples ... ERROR
Error in paste(before, x, after, sep = "") : object 'exfile' not found
Execution halted
2012 Apr 17
1
url, readLines, source behind a proxy
Hi,
when I run R CMD check with flag --as-cran, the process hangs at stage:
* checking CRAN incoming feasibility ...
I am pretty sure it is a proxy issue.
I looked at the check code in the tools package and it seems that the
issue is in the local function `.repository_db()` (defined in
`tools:::.check_package_CRAN_incoming()`), which eventually calls
`url()` with argument
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