Displaying 20 results from an estimated 500 matches similar to: "as() creates invalid entries in methods list?"
2008 Aug 27
1
S4 coercion
I am extending a DBI connection by
setClass("TSPostgreSQLConnection",
contains=c("PostgreSQLConnection","TSdbOptions"))
but the first time I use this I am getting a warning when it tries to
coerce the TSPostgreSQLConnection to a PostgreSQLConnection. After the
first use the warning stops, but the first warning is causing me
problems when I do automatic checks
2012 Aug 22
1
loading both RPostgreSQL and RSQLite leads to problems
hello,
if i load the RSQLite package in addition to the RPostgreSQL package,
i get various errors when trying to use RPostgreSQL functions. here is
an example transcript showing one such error:
==========================================================
R version 2.15.0 (2012-03-30)
[...]
> packageVersion('RPostgreSQL')
[1] 0.3.2
> packageVersion('RSQLite')
[1] 0.11.1
2014 Nov 25
0
problem with setGroupGeneric from package methods
Hi,
There seems to be a problem with setGroupGeneric() from package 'methods'. The symptoms are somewhat erratic, in the sense that small changes may lead to any of the following behaviours.
1.Package works without problems on Windows and installs on Linux but gives error when loaded with library().
2.Package installs on both systems and gives error when loaded on any of them.
3.
2009 Apr 27
2
refit with binomial model (lme4)
Dear R users,
I'm trying to use function 'refit' from lme4
and I get this error that I can't understand:
> refit(dolo4.model4,cbind(uu,50-uu))
Error in function (classes, fdef, mtable) :
unable to find an inherited method for function "refit", for signature
"mer", "matrix"
if I try:
> refit(dolo4.model4,uu)
Error in asMethod(object) :
2015 May 28
3
S4 inheritance and old class
Hey everyone,
I would like to develop a package using S4 classes.
I have to define several S4 classes that inherits from each others as
follow:
# A <- B <- C <- D
I also would like to define .DollarNames methods for these class so, if I
have understood well, I also have to define an old class as follow:
# AOld <- A <- B <- C <- D
setOldClass(Classes = "AOld")
2005 Nov 14
1
Tidiest way of modifying S4 classes?
I wish to make modifications to the plot.pedigree function in the
kinship package. My attempts to contact the maintainer have been
unsuccessful, but my question is general, so specifics of the kinship
package might not be an issue.
My first attempt was to make a new function Plot.pedigree in the
.GlobalEnv which mostly achieved what I wanted to. However, I'm sure
that's not the tidiest
2002 Jan 09
0
methods: Extending classes
Hi (again), let's say I want to create a class Matrix that extends the class
matrix, but I can't get it to work. I define the class as
> setClass("Matrix", "matrix")
> getClass("Matrix")
No Slots, prototype of class "matrix"
Extends:
Class "matrix" directly.
Class "structure" by class "matrix".
2011 Aug 04
1
How to get the test statistic corresponding to the p-value in mtable?
Dear R-Users,
I want to use mtable from package "memisc" to produce Latex-style estimation
output. However, mtable() only gives me a p-value and not the corresponding
test-statistic. Does anyone know how to extract it, either from a glm/anova
object or mtable? Here is a short example:
# Run this ####################
install.packages("memisc")
library(memisc)
set.seed(1)
2012 Aug 31
1
using apply with sparse matrix from package Matrix
Hi:
I was trying to use apply on a sparse matrix from package Matrix,
and I get the error:
Error in asMethod(object) :
Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 106
Is there a way to apply a function to all the rows without bumping
into this problem?
Here is a simplified example:
> dim(sm)
[1] 72913 43052
> class(sm)
[1] "dgCMatrix"
2018 Feb 06
1
gdistance::shortestPath throws error "not a symmetric matrix"
Hi,
Calling
gdistance::shortestPath
gives me the error
Error in asMethod(object) :
not a symmetric matrix; consider forceSymmetric() or symmpart()
The output of dput(.traceback()) is
pairlist("stop(\"not a symmetric matrix; consider forceSymmetric() or symmpart()\")",
"asMethod(object)",
"as(Laplacian,\"symmetricMatrix\")",
2012 Aug 03
1
Interaction between callNextMethod() and selectMethod()
Hi,
Strange things happen. Here is a simple example:
> setClass("A", contains="integer")
> setMethod("as.matrix", "A", function(x, ...) t(callNextMethod()))
Creating a generic function for ?as.matrix? from package ?base? in
the global environment
[1] "as.matrix"
> a <- new("A", 1:3)
> as.matrix(a)
2012 Aug 05
2
setMethod sometimes fails to set package slot when signature has trailing 'ANY'
after this
setClass("A")
setGeneric("bar", function(x, y) standardGeneric("bar"))
setMethod(bar, signature(x="A", y="A"), function(x, y) {})
setMethod(bar, signature(x="A", y="ANY"), function(x, y) {})
the method for signature c("A", "A") contains package information
> str(getMethod(bar,
2011 Jan 06
2
memisc-Tables with robost standard errors
Hello,
I've got a question concerning the usage of robust standard errors in
regression using lm() and exporting the summaries to LaTeX using the
memisc-packages function mtable():
Is there any possibility to use robust errors which are obtained by
vcovHC() when generating the LateX-output by mtable()?
I tried to manipulate the lm-object by appending the "new" covariance
2012 Sep 05
0
model.table (anova)
Hello everybody,
I have a problem with the model.table of anova.
I have data (datos2) with 4 cluster (V7), calculated with daisy and hclust.
str(datos2)
'data.frame': 56 obs. of 7 variables:
$ Estacion: Factor w/ 56 levels "Abradelo","AltoDoRodicio",..: 1 2 3 4 5 6
7 8 9 10 ...
$ Invierno: num 36 53.9 37.1 63.6 12.5 ...
$ X : int 643449 616292 562796
2004 May 13
0
using trace() on S4 coerce method
I'm trying to use trace() on an S4 coerce method, but get the error
Error in bindingIsLocked(what, whereM) : no binding for "coerce"
What am I doing wrong? Example code follows.
(I've googled the R mailing lists for "trace coerce" and "trace
bindingisLocked" without finding anything relevant. Perhaps I should
re-define the method in terms of an
2011 Dec 12
1
Package/command for creating a table of panel models ?
Hello Everyone
(Quick) question: Does anyone know a package/command or simply a way of
creating a table of different panel data estimations (estimated using
/*plm()*/ ) just as *mtable()* does for models estimated with /*lm()*/?
It seems *mtable* (and *apsrtable* equally) only support /*lm*/ and some
other classes but unfortunately not /*plm*/. I am pretty sure others must
have encountered this
2011 Oct 10
1
pmml for random forest & rules
Hi,
I am having some trouble using R 2.13.1 for generating a pmml object
of of class "c('randomForest.formula', 'randomForest')"
I see that these methods are available:
> methods(pmml)
[1] pmml.coxph* pmml.hclust* pmml.itemsets* pmml.kmeans*
pmml.ksvm* pmml.lm* pmml.multinom* pmml.nnet*
pmml.rpart*
[10] pmml.rsf* pmml.rules* pmml.survreg*
2012 Oct 05
1
Error in lmer: asMethod(object) : matrix is not symmetric [1, 2]
Dear R Users,
I am having trouble with lmer. I am looking at recombinant versus non
recombinant individuals. In the response variable recombinant
individuals are coded as 1's and non-recombinant as 0's. I built a model
with 2 fixed factors and 1 random effect. Sex (males/females) is the
first fixed effect and sexual genotype (XY, YY, WX and WY) the second
one. Sexual Genotype is
2015 Jul 07
0
List S3 methods and defining packages
On 07/07/2015 02:05 AM, Renaud Gaujoux wrote:
> 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",
2009 Aug 05
1
S4 method dispatch: coercion of arguments with setAs defined
Hi list,
I've got a class B that contains a slot obj of class A. I'd like to be
able to call all the methods of class A directly on objects of class B
as if I had called the method on slot obj. This without overloading all
methods of class A to work on class B.
I don't define B as an extension of A, because I want class B to also
work with objects of classes that inherit from