similar to: Errors while compiling packages with namespace?

Displaying 20 results from an estimated 900 matches similar to: "Errors while compiling packages with namespace?"

2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called directly by users. rms uses generic functions defined in other packages. For example there is a latex method in the Hmisc package, and rms has a latex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms. I use:
2010 Sep 01
1
S3 method for package listed in suggest/enhance
Hi all, The profr package provides a method for displaying its output with ggplot: ggplot.print. You don't need this ggplot2 to use profr, so ggplot2 is listed under enhances in the DESCRIPTION file. If I have just S3method(ggplot, profr) in my NAMESPACE, then I get: ** testing if installed package can be loaded Error : object 'ggplot' not found whilst loading namespace
2007 Dec 10
1
cyclic dependency error
Dear all, I am encountering a cyclic dependency error when running R CMD check on an R package I wrote (R version 2.6.1, Mac OS X 10.4), see the error message below. Creating a new generic function for "print" in "clValid" Creating a new generic function for "summary" in "clValid" Creating a new generic function for "plot" in
2012 Dec 08
1
namespace S3 and S4 generic imports cannot both be satisfied:
PkgA wishes to write a method for 'unique' on S4 class 'A'. ?Methods indicates that one should setGeneric("unique") setClass("A") unique.A <- function(x, incomparables=FALSE, ...) {} setMethod(unique, "A", unique.A) Both S3 and S4 methods need to be exported in the NAMESPACE import(methods) S3method(unique, A)
2010 Feb 14
1
How S3method() is implemented and called? And when to use it?
R-exts.pdf discribes S3method a little bit. But I want to understand more on how it is called, implemented and when to use it. I don't find it in an R session. But I see S3method() in some NAMESPACE files. > S3method Error: object 'S3method' not found > ?S3method No documentation for 'S3method' in specified packages and libraries: you could try '??S3method' I
2009 May 27
1
"Error: package/namespace load failed"
I am writing my first R package, and I have been getting the following series of errors when I run R CMD check: * checking S3 generic/method consistency ... WARNING Error: package/namespace load failed for 'REEMtree' Call sequence: 2: stop(gettextf("package/namespace load failed for '%s'", libraryPkgName(package)), call. = FALSE, domain = NA) 1: library(package,
2015 Jul 07
3
List S3 methods and defining packages
Hi, from the man page ?methods, I expected to be able to build pairs (class,package) for a given S3 method, e.g., print, using attr(methods(print), 'info'). However all the methods, except the ones defined in base or S4 methods, get the 'from' value "registered S3method for print", instead of the actual package name (see below for the first rows). Is this normal
2013 Aug 24
2
Correct NAMESPACE approach when writing an S3 method for a generic in another package
Dear List, In one of my packages I have an S3 method for the plot3d generic function from package rgl. I am trying to streamline my Depends entries but don't know how to have plot3d(foo) in the examples section for the plot3d method in my package, without rgl being in Depends. Note that I importFrom(rgl, plotd3d) and register my S3 method via S3Method() in the NAMESPACE. If rgl is not in
2010 Nov 30
1
warning creating an as.array method in a package
[Env: R 2.11.1, Win Xp, using Eclipse/StatET] In a package I'm working on, I want to create as.matrix() and as.array() methods for a particular kind of object (log odds ratios). These are returned in a loddsratio object as the $coefficients component, a vector, but really reflect an underlying (R-1)x(C-1)xstrata array, whose attributes are contained in other components. I define coef,
2005 Apr 28
1
strange behaviour of importFrom directive in name space
Dear listers, After activating the name space for my bioconductor package (prada) I successfully ran R CMD check. However when loading the package in R and running the examples the imported function brewer.pal from package RColorBrewer is not found. I can directly call brewer.pal from the RColorBrewer name space typing RColorBrewer::brewer.pal, but it is not imported into my prada name space. When
2005 Apr 28
1
strange behaviour of importFrom directive in name space
Dear listers, After activating the name space for my bioconductor package (prada) I successfully ran R CMD check. However when loading the package in R and running the examples the imported function brewer.pal from package RColorBrewer is not found. I can directly call brewer.pal from the RColorBrewer name space typing RColorBrewer::brewer.pal, but it is not imported into my prada name space. When
2013 Mar 13
1
S4 generic not exported correctly / incorrect dispatch?
In this post https://stat.ethz.ch/pipermail/bioc-devel/2013-March/004152.html a package author reports that S4 dispatch fails. I can reproduce this with a PkgA (attached; 'intervals' is a relatively light-weight CRAN package) that has DESCRIPTION with Depends: intervals Imports: graphics NAMESPACE: importFrom(graphics, "plot") export("plot")
2010 Dec 09
1
warning creating an as.array method in a package
I posted on this topic to r-help, but never got a sufficient answer, so I'm reposting here. [Env: R 2.11.1, Win Xp, using Eclipse/StatET] In a package I'm working on, I want to create as.matrix() and as.array() methods for a particular kind of object (log odds ratios). These are returned in a loddsratio object as the $coefficients component, a vector, but really reflect an underlying
2006 Sep 01
1
as.environment(NULL)
Hi In NEWS, it says R CMD check now tests that the package can be loaded, and that the package and namespace (if there is one) can each be loaded in startup code (before the standard packages are loaded). For package "onion", I think I have followed all of sections 1.6.1 - 1.6.6 of R-exts, and it passes R CMD check for R-2.3.1. However, using R version 2.4.0 Under
2019 May 14
2
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
CCing r-devel. On Tue, 14 May 2019 at 02:11, Pavel Krivitsky <pavel at uow.edu.au> wrote: > > Dear All, > > I've run into this while updating a package with unfortunately named > legacy functions. It seems like something that might be worth changing > in R, and I want to get a sense of whether this is a problem before > submitting a report to the Bugzilla. > >
2008 Feb 15
12
Transfer Crosstable to Word-Document
# Dear list, # I am an R-beginner and # spent the last days looking for a method to insert tables produced # with R into a word document. I thought about SPPS: copy a table from # an SPO-file and paste it into a word document # (if needed do some formatting with that table). # Annother idea was, to produce a TEX-file, # insert it and make it a word-table. # I found the following libraries, which
2013 Apr 24
1
Problem with S3 method dispatch and NAMESPACE
I have updated the rms package to extensively use NAMESPACE. I cannot get certain S3 methods to dispatch. For example I have in NAMESPACE S3method(anova, rms) S3method(latex, anova.rms) anova.rms produces an object of class "anova.rms" and there is a latex.anova.rms function in rms. But when I do latex(anova(fit)) I get an invocation of latex.default. I have tried using
2017 Sep 01
3
side-effect of calling functions via `::`
Dear list I'm not sure whether this is a bug or an unavoidable consequence of the way packages are loaded, but there can be surprising side effects of calling a function via package::function. Here's an example using the formula.tools package: form <- a ~ b as.character(form) formula.tools::lhs(form) as.character(form) The first call to as.character returns: [1] "~"
2007 Nov 05
2
namespace crash on S3method("as.ff",function)
Dear all, I have defined a generic as.ff(x, ...) and a method as.ff.function(x, ...) which converts a standard R function x into a chunked version operating on large ff objects. Everything works fine, but when registering S3method("as.ff",function) in NAMESPACE, the installation fails with some kind of parsing error: adding build stamp to DESCRIPTION installing NAMESPACE file
2009 Jun 03
0
Problems with conditional importFrom in NAMESPACE
Hi, I am currently involved in the development of two R-packages, pkg1 and pkg2. They should not be dependent on each other, as most users will only be interested in one of them. Still, I want pkg2 to provide one extra S3 method for three functions (fun1-3) in pkg1 for objects of a class defined in pkg2 (class2), for those users who actually have both packages installed. I think this