Displaying 7 results from an estimated 7 matches for "cldef".
Did you mean:
cdef
2014 Nov 25
0
problem with setGroupGeneric from package methods
...re, attach = TRUE, searchWhere = as.environment(where),
doCheck = TRUE)
{
## a collection of actions performed on attach or detach
## to update class and method information.
pkg <- getPackageName(where)
classes <- getClasses(where)
for(cl in classes) {
cldef <- (if(attach) get(classMetaName(cl), where) # NOT getClassDef, it will use cache
else getClassDef(cl, searchWhere))
if(is(cldef, "classRepresentation")) {
if(attach) {
.cacheClass(cl, cldef, is(cldef, "ClassUnionRepresentatio...
2006 Jan 03
1
Extending a data frame with S4
...data.frame", representation("data.frame"))
[1] "new-data.frame"
Warning message:
old-style ('S3') class "data.frame" supplied as a superclass of
"new-data.frame", but no automatic conversion will be peformed for S3
classes in: .validDataPartClass(clDef, name)
Do I need to be worried about this?
> new("new-data.frame", data.frame())
Error in initialize(value, ...) : initialize method returned an object
of class "data.frame" instead of the required class "new-data.frame"
I guess this is related to the warning abo...
2013 Oct 29
1
unloadNamespace, getPackageName and "Created a package name xxx " warning
...ble')))
I was wondering what could be done to get rid of these warnings, which I
believe in the case "unloadNamespace" case are irrelevant.
The stack of calls is:
# where 3: sapply(where, getPackageName)
# where 4: findClass(what, classWhere)
# where 5: .removeSuperclassBackRefs(cl, cldef, searchWhere)
# where 6: methods:::cacheMetaData(ns, FALSE, ns)
# where 7: unloadNamespace(pkgname)
So for instance:
>findClass('data.frame', getNamespace('data.table'))
generates a warning which once again seems irrelevant.
On the top of my head, I could imagine adding an extr...
2020 Oct 26
0
Change to I() in R 4.1
...ic class ("NULL") with no slots
> IM
----------- FAILURE REPORT --------------
--- failure: length > 1 in coercion to logical ---
--- srcref ---
:
--- package (from environment) ---
methods
--- call from context ---
showDefault(object)
--- call from argument ---
!is.null(clDef) && isS4(object) && is.na(match(clDef at className,
.BasicClasses))
--- R stacktrace ---
where 1: showDefault(object)
where 2: Error in showDefault(object) :
cannot get a slot ("slots") from an object of type "NULL"
>
> Unfortunately there is a...
2020 Oct 23
2
Change to I() in R 4.1
Hi there,
Is that change in R-devel intentional?
library(Matrix)
m <- as(matrix(c(0, 1)), "sparseMatrix")
isS4(m)
# [1] TRUE
x <- I(m)
# Warning message:
# In `class<-`(x, unique.default(c("AsIs", oldClass(x)))) :
# Setting class(x) to multiple strings ("AsIs", "dgCMatrix", ...);
result will no longer be an S4 object
2004 Jul 22
2
Files and classes in a package?
...object (e.g,. a class or generic function) to find
in the meta-data must be a single string (got an object of class "NULL")
> traceback()
12: methodsPackageMetaName("C", name)
11: classMetaName(Class)
10: getClassDef(Class, where)
9: getClass(cl, TRUE)
8: .validDataPartClass(clDef, name)
7: reconcilePropertiesAndPrototype(name, slots, prototype, superClasses,
where)
6: makeClassRepresentation(Class, properties, superClasses, prototype,
package, validity, access, version, sealed, where = where)
5: setClass("aclass", contains = "bclass", repre...
2020 Oct 30
2
Change to I() in R 4.1
...> ----------- FAILURE REPORT --------------
> --- failure: length > 1 in coercion to logical ---
> --- srcref ---
> :
> --- package (from environment) ---
> methods
> --- call from context ---
> showDefault(object)
> --- call from argument ---
> !is.null(clDef) && isS4(object) && is.na(match(clDef at className,
> .BasicClasses))
> --- R stacktrace ---
> where 1: showDefault(object)
> where 2: Error in showDefault(object) :
> cannot get a slot ("slots") from an object of type "NULL"
The way I i...