similar to: R package creation: 'show' extension not imported correctly

Displaying 20 results from an estimated 9000 matches similar to: "R package creation: 'show' extension not imported correctly"

2009 Jul 09
1
class export in package creation / setClass / namespace?
Dear all, I have been trying to create an R package. This has been successfull until I tried to define classes. Currently, my procedure is the following: Start R, load the function and class definition >tmp <- function (x) {x} >setClass("rpa", contains = "list", where=topenv(parent.frame())) Use package skeleton to create directory structure:
2011 Dec 15
1
S4 NAMESPACE method imports and exports do not include (promoted?) generics
In > R.version.string [1] "R Under development (unstable) (2011-12-15 r57901)" section 1.6.6 of 'Writing R Extensions' says Note that exporting methods on a generic in the namespace will also export the generic, and exporting a generic in the namespace will also export its methods. and Note that importMethodsFrom will also import any generics defined in
2011 Mar 26
1
another import puzzle
Dear list, I have another (again possibly boneheaded) puzzle about importing, again encapsulated in a nearly trivial package. (The package is posted at <http://www.math.mcmaster.ca/bolker/misc/coefsumtest_0.001.tar.gz>.) The package consists (only) of the following S3 method definitions: coeftab <- function(object, ...) UseMethod("coeftab",object) coeftab.default <-
2004 Jan 08
3
S3, S4, namespace
I have encountered an issue which I have been unable to resolve, involving an S3 generic (print) being declared S4 generic in a package, and the method being exported. This all works fine - the problem occurs when I try to import the method to another package. Here is the bit that works fine. ------------- #the .r file for package bar
2007 May 03
1
Imports/exports of S4 methods
I have a question about what to do in the following situation (please bear with the setup): Package A defines an S4 generic 'foo' and as well as S4 methods for 'foo' and has exportMethods("foo") in its NAMESPACE file. Package B defines another method for 'foo' for class "bar" and has importFrom(A, "foo") exportMethods("foo")
2012 Feb 26
1
improved error message when existing implicit S4 generic is not imported?
pkgA's NAMESPACE has importFrom(graphics, plot) exportClasses("A") exportMethods("plot") R/foo.R has setClass("A") setMethod("plot", "A", function(x, y, ...) {}) During R CMD INSTALL pkgA_1.0.tar.gz we are told ** preparing package for lazy loading Creating a generic function for 'plot' from package
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
2003 Sep 05
1
namespaces and S4 methods/classes
The current version of the methods package now has a namespace. Packages using S4 methods and classes can have NAMESPACE files. New directives can be included in NAMESPACE files to import and export classes and methods. Namespaces allow cleaner definition of the API for packages, and are needed for future improvements to R. NOTE: This is a major revision. In principle, it should be back
2010 May 29
3
S4 dispatch for .DollarNames (utils)
Hello, I'm trying to make .DollarNames generic and implement a method for it in a package. .DollarNames is the function that is now called to get completion possibilities. My R code looks like this: setGeneric( ".DollarNames" ) setClass("track", representation(x="numeric", y="numeric")) ## A class extending the previous, adding one more
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
2015 May 10
2
S4 method dispatch sometimes leads to incorrect when object loaded from file?
Loading an S4 object from a file without first loading the library sometimes (?, the example below and actual example involves a virtual base class and the show generic) leads to incorrect dispatch (to the base class method). The attached package reproduces the problem. It has setClass("A") setClass("B", contains="A") setMethod("show", "A",
2006 Jan 08
2
exporting methods/classes
Dear R People: I'm still struggling with sending methods and classes as part of creating a new package. Where does the .onLoad function go? Within R itself or in a file in one of the new package directories? Here are my latest efforts: Here's the last part of the woof1-Ex.Rout > library('woof1') Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =
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
2004 Oct 14
2
setClassUnion
Hello, I have a question concerning "setClassUnion". I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000. I tried to use "setClassUnion" in a package I am currently working on. The situation is similar to the following example: The DESCRIPTION file has entries: Depends: R (>= 2.0.0), methods Imports: methods LazyLoad: yes The NAMESPACE file has
2004 Oct 14
2
setClassUnion
Hello, I have a question concerning "setClassUnion". I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000. I tried to use "setClassUnion" in a package I am currently working on. The situation is similar to the following example: The DESCRIPTION file has entries: Depends: R (>= 2.0.0), methods Imports: methods LazyLoad: yes The NAMESPACE file has
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
2007 May 01
1
Questions about name space directives
Hi, I'm hoping to get some clarification of the intent of some of directives used in NAMESPACE files. 1. Is import(somePkg) also intended to import all classes and methods that are exported via exportClasses and exportMethods in somePkg? I think import pulls in classes and methods, but it isn't clear from the docs whether this is as intended. 2. What is exportMethods intended
2011 Dec 15
1
R CMD check fails to warn about undocumented classes and methods
In > R.version.string [1] "R Under development (unstable) (2011-12-15 r57901)" PkgA promotes 'unique' to a generic and exports that DESCRIPTION: Imports: methods R/f.R: setGeneric("unique") NAMESPACE: export(unique) and PkgB creates and exports a method on unique DESCRIPTION Imports: methods, PkgA R/f.R: setClass("B",
2015 May 12
1
S4 method dispatch sometimes leads to incorrect when object loaded from file?
>>>>> Martin Morgan <mtmorgan at fredhutch.org> >>>>> on Mon, 11 May 2015 10:18:07 -0700 writes: > On 05/10/2015 08:19 AM, Martin Morgan wrote: >> Loading an S4 object from a file without first loading the library sometimes (?, >> the example below and actual example involves a virtual base class and the show >> generic)