Displaying 20 results from an estimated 20000 matches similar to: "S3 vs S4 classes"
2008 Mar 10
1
Check errors using R2.6.2
I can successfully "check" a package with source under 2.5.1, including
compiling source files and running examples with no errors or warnings.
when I try with R2.6.2, I get make errors:
making bayesmc.d from bayesmc.c
make[3]:gcc-sjlj: Command not found
etc.
my gcc is version 3.4.2
I'm using Windows XP.
Any thoughts?
thanks!
peter r
................................
Peter
2006 Jan 06
1
vectorization of groups of dot products
I have a set of n vectors, x_1, ..., x_n, of the same length.
I would like to form the vector of dot products -- x_1'x_1, ..., x_n'x_n
the fastest way I can think to do this is to put the vectors into a
matrix
and do
diag(crossprod(X))
however, this seems to be very wasteful since this computes n(n+1)/2-n
unnecessary
dot products.
Is there a better way using existing functions in R?
2006 Jul 26
1
.Call question
Writing R Ext says to treat R objects that are arguments to .Call as
read only (i.e. don't modify).
I have a long list of lists that and I want to avoid the overhead of a
copy in my C code. I would just like to modify some of the elements
of list by replacing them with elements of exactly the same size/type.
below is an example of the essence of the problem. This seems to work.
Is this
2006 Jan 16
3
run-time of an R function
I have noticed dramatic differences in the run-time for the execution of
one of my functions depending on whether or not R was restarted.
Immediately
after restart of R GUI, exec time = 2.8 min. If I then repeat the
execution
of the function in the same R session, exec time = 7.1 min. Removing all
objects via rm(list=(all=TRUE)) and initiating gc (gc(reset=TRUE))
helps, but
only slightly (exec
2018 May 24
2
Creating S3 methods for S4 classes (coming from r-package-devel)
Dear all,
I asked this question on r-package-devel but Martin Maechler pointed out
this was more suited on R-devel. So here it goes:
per the manual, one should create and register both the S3 and a S4 method
if one needs a method for an S4 class for a function using S3 dispatching.
This is cumbersome, and not very optimal.
I was wondering if there's a better way to do this. Currently I
2018 May 24
1
Creating S3 methods for S4 classes (coming from r-package-devel)
On Thu, May 24, 2018 at 6:20 PM, Michael Lawrence <lawrence.michael at gene.com
> wrote:
> You only have to make an S4 method if there is already an S4 generic.
> If there is just an S3 generic, then just define S3 methods on it.
I was refering to the recommendations in ?Methods_for_S3 (
https://stat.ethz.ch/R-manual/R-devel/library/methods/html/Methods_for_S3.html).
:
"Two
2005 Apr 23
0
patch release of bayesm
Folks-
a patch release of bayesm, v0.0-1, is now available on CRAN. This release corrects some errors in the help pages as well as one error in the function rhierLinearModel involving an incorrect default prior setting.
peter
................................
Peter E. Rossi
Joseph T. and Bernice S. Lewis Professor of Marketing and Statistics
Editor, Quantitative Marketing and Economics
Rm
2005 May 20
0
Version 1.0-1 of bayesm
Version 1.0-1 of bayesm is now available on CRAN.
This is our first "production" version which include s much improved documentation as well as five data sets used in our book, Bayesian Statistics and Marketing.
peter r
................................
Peter E. Rossi
Joseph T. and Bernice S. Lewis Professor of Marketing and Statistics
Editor, Quantitative Marketing and Economics
2005 Jun 15
0
Version 1.1-0 of bayesm
Version 1.1-0 of bayesm is now available on CRAN.
This version includes Bayesian inference for the NBD(Poisson) regression
model and a hierarchical version of the same. It also includes an additional
dataset with count data and various covariates.
Comments and suggestions for improvement are most welcome.
................................
Peter E. Rossi
Joseph T. and Bernice S. Lewis
2005 Apr 23
0
patch release of bayesm
Folks-
a patch release of bayesm, v0.0-1, is now available on CRAN. This release corrects some errors in the help pages as well as one error in the function rhierLinearModel involving an incorrect default prior setting.
peter
................................
Peter E. Rossi
Joseph T. and Bernice S. Lewis Professor of Marketing and Statistics
Editor, Quantitative Marketing and Economics
Rm
2005 May 20
0
Version 1.0-1 of bayesm
Version 1.0-1 of bayesm is now available on CRAN.
This is our first "production" version which include s much improved documentation as well as five data sets used in our book, Bayesian Statistics and Marketing.
peter r
................................
Peter E. Rossi
Joseph T. and Bernice S. Lewis Professor of Marketing and Statistics
Editor, Quantitative Marketing and Economics
2005 Jun 15
0
Version 1.1-0 of bayesm
Version 1.1-0 of bayesm is now available on CRAN.
This version includes Bayesian inference for the NBD(Poisson) regression
model and a hierarchical version of the same. It also includes an additional
dataset with count data and various covariates.
Comments and suggestions for improvement are most welcome.
................................
Peter E. Rossi
Joseph T. and Bernice S. Lewis
2005 Oct 03
0
release of version 2.0-1 of bayesm
Folks-
We are pleased to announce the release of version 2.0-1 of bayesm.
Highlights of the new version:
1. Bayesian treatment of SUR (seemingly unrelated regression)
2. Added clustering to mixture of normals models
3. Added routines to compute implied univ and bivariate densities from
mixture of normals MCMC draws
4. improved input error checking in many routines
please get rid of your
2008 Mar 07
0
bayesm version 2.2-0
bayesm version 2.2-0 is now available on CRAN.
Major changes include:
1. general density estimation using a Dirichlet Process Prior and a
normal base
2. linear instrumental variable models with unknown error distributions
(the Bayesian analogue of IV methods). Achieved via DP priors.
peter r
................................
Peter E. Rossi
Joseph T. and Bernice S. Lewis Professor of
2005 Oct 03
0
release of version 2.0-1 of bayesm
Folks-
We are pleased to announce the release of version 2.0-1 of bayesm.
Highlights of the new version:
1. Bayesian treatment of SUR (seemingly unrelated regression)
2. Added clustering to mixture of normals models
3. Added routines to compute implied univ and bivariate densities from
mixture of normals MCMC draws
4. improved input error checking in many routines
please get rid of your
2009 Mar 18
1
Why S4 methods of S3 'base' generics are not used in 'base' functions ?
Dear list,
It seems that S4 methods defined for an S3 'base' generic
are not used in 'base' functions.
This can be problematic when 'base' functions start with
something like 'as.matrix'.
### START R code
setClass("classA", contains = "matrix",
representation(realData = "numeric"))
setMethod("as.matrix",
2014 Jul 06
2
Depot for S3 to S4 generics (as in stats4)?
Dear developers,
the implementation of S4 generics for existing S3 ones in the base
package is concerned to be a threat to quick startup times [1]. But
since S4 is promoted, and S3/S4 interoperability a pain when package
developing [2], are there efforts to improve the situation? E.g. an S3
free system, etc.
A good thing [2] is the package 'stats4', including some setGeneric
calls (e.g.
2007 Mar 08
0
Release 2.1-1 of bayesm
Release 2.1-1 is now available on CRAN.
This release includes--
bayesm classes (some compatible with the mcmc class of coda) for output.
plot
and summary methods for these classes.
additional datasets including store-level panel data.
peter r
................................
Peter E. Rossi
Joseph T. and Bernice S. Lewis Professor of Marketing and Statistics
Editor, Quantitative Marketing
2005 May 23
2
Documentation of S3 and S4 classes, inheritance
I'd like to have a class A that computes a likelihood, and a subclass B
that computes the same likelihood by sometimes throws in an additional
term (B includes measurement error).
So B's likelihood needs to call A's, and then (sometimes) multiply by an
additional term.
It sounds as if, in the S3 scheme, NextMethod is supposed to do this:
like.A <- function(stuff) compute value
2010 Jun 13
1
S4 classes and S3 generic functions
A general goal for the next version of R is to make S4 and S3 play
better together.
As mentioned in a previous thread, one limitation has been that S3
generic functions, specifically the UseMethod() call, did not make use
of S4 inheritance when dispatching on general S4 objects.
This has been fixed in a version committed today (updated to rev 52267).
The code change is not large, but it