Displaying 10 results from an estimated 10 matches for "getclassfromcache".
2013 Mar 13
1
removing union class
Hi,
I get the following error when trying to remove a union class:
> setClassUnion('a', c('matrix', 'numeric'))
> removeClass('a')
> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: i686-pc-linux-gnu (32-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8
2015 May 04
2
Problem with adding slots to S4 object
Dear all,
I'm trying to create a virtual S4 class with some subclasses. I noticed
that adding slots to this class increases the memory use and slows the
functions down. Note that I'm adding very small slots (integer or character
both of length 1).
I've made a reproducible example at
https://github.com/ThierryO/testvirtualclass. The R CMD check --as-cran
fails on the tests.
Some of
2015 May 05
1
Problem with adding slots to S4 object
...2.24 1.23 2.24 1.23
> "unique.default" 1.42 0.78 1.42 0.78
> "match" 0.58 0.32 0.58 0.32
> "[[" 0.54 0.30 0.54 0.30
> ".getClassFromCache" 0.08 0.04 0.08 0.04
> "loadMethod" 0.06 0.03 0.06 0.03
>
> $by.total
> total.time total.pct self.time self.pct
> "eval" 182.52 100.00 0.00 0....
2015 May 05
0
Problem with adding slots to S4 object
...ot;:" 2.24 1.23 2.24 1.23
"unique.default" 1.42 0.78 1.42 0.78
"match" 0.58 0.32 0.58 0.32
"[[" 0.54 0.30 0.54 0.30
".getClassFromCache" 0.08 0.04 0.08 0.04
"loadMethod" 0.06 0.03 0.06 0.03
$by.total
total.time total.pct self.time self.pct
"eval" 182.52 100.00 0.00 0.00
"my_lmer"...
2012 Feb 21
1
Why cant my S4 class have a slot named `C`?
...prototype=prototype(
x=numeric(),
y=numeric(),
C=numeric(),
eps=numeric()))
SVM <- function(x, y, C, eps) {
new("SVM", x=x, y=y, C=C, eps=eps)
}
And now a call to my "constructor"
R> SVM(1:10, 1:10, 1, 0.5)
Error in .getClassFromCache(Class, where) :
Class should be either a character-string name or a class definition
==================
This error occurs with both R-2.14.1 and R-devel
Changing the name name from `C` to `Cost` fixes it:
==================
setClass("svm",
representation=representation(...
2015 Jan 21
2
reducing redundant work in methods package
...on(ns = asNamespace("methods")) {
funs = c("isClassUnion", "getClass", "genericForPrimitive",
"possibleExtends", ".dataSlot", ".requirePackage", ".classEnv",
"getClassDef", "outerLabels", ".getClassFromCache", "getFunction")
message(paste0("\nCollecting data for unit tests on ", paste(funs,
collapse=", "), " ...\n"))
# Make env with list to hold test input/output
TEST_ENV <- new.env()
for (fname in funs) {
# Make placeholder f...
2015 Jan 21
2
reducing redundant work in methods package
...uot;)) {
>>
>> funs = c("isClassUnion", "getClass", "genericForPrimitive",
>> "possibleExtends", ".dataSlot", ".requirePackage", ".classEnv",
>> "getClassDef", "outerLabels", ".getClassFromCache", "getFunction")
>>
>> message(paste0("\nCollecting data for unit tests on ", paste(funs,
>> collapse=", "), " ...\n"))
>>
>> # Make env with list to hold test input/output
>>
>> TEST_ENV <- new.en...
2015 Jan 21
0
reducing redundant work in methods package
...("methods")) {
>
> funs = c("isClassUnion", "getClass", "genericForPrimitive",
> "possibleExtends", ".dataSlot", ".requirePackage", ".classEnv",
> "getClassDef", "outerLabels", ".getClassFromCache", "getFunction")
>
> message(paste0("\nCollecting data for unit tests on ", paste(funs,
> collapse=", "), " ...\n"))
>
> # Make env with list to hold test input/output
>
> TEST_ENV <- new.env()
>
> for (fname...
2010 Feb 08
2
Error on start R in server
...;, 100 then 101
Warning: stack imbalance in '{', 101 then 98
Warning: stack imbalance in 'if', 99 then 97
Warning: stack imbalance in '<-', 84 then 85
Warning: stack imbalance in '{', 82 then 84
Warning: stack imbalance in 'if', 80 then 82
Traceback:
1: .getClassFromCache(Class, where)
2: getClassDef(cl)
3: methods:::is(genfun, "genericFunction")
4: registerS3methods(nsInfo$S3methods, package, env)
5: loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =
keep.source)
6: doTryCatch(return(expr), name, parentenv, handler)
7: tryCatchOne(expr,...
2015 Jan 22
0
reducing redundant work in methods package
...;>
>>> funs = c("isClassUnion", "getClass", "genericForPrimitive",
>>> "possibleExtends", ".dataSlot", ".requirePackage", ".classEnv",
>>> "getClassDef", "outerLabels", ".getClassFromCache", "getFunction")
>>>
>>> message(paste0("\nCollecting data for unit tests on ", paste(funs,
>>> collapse=", "), " ...\n"))
>>>
>>> # Make env with list to hold test input/output
>>>
>>&g...