similar to: Example of package that uses a namespace with S4 classes

Displaying 20 results from an estimated 40000 matches similar to: "Example of package that uses a namespace with S4 classes"

2006 May 18
3
S4 classes and C
Is there any good source of information on how S4 classes (and methods) work from C? E.g., for reading how to read a slot value how to invoke a method how to test if you have an s4 object For writing, how to make a new instance of an S4 object. I've found scattered hints in the archive, including a link to a talk on this subject "I am using C code to create an S4 object based on
2009 Jun 21
5
Roxygen vs Sweave for S4 documentation
Hi, I have been using R for a while. Recently, I have begun converting my package into S4 classes. I was previously using Rdoc for documentation. Now, I am looking to use the best tool for S4 documentation. It seems that the best choices for me are Roxygen and Sweave (I am fine with tex). Are there any users of Roxygen or Sweave who can comment on the strengths or weaknesses of one or othe
1997 Sep 02
1
R-alpha: R interaction within ESS-4.9-b11: two small issues
1) I installed the latest ESS (Emacs Speaks Statistics) beta release on a machine running Linux. Since there is no S-PLUS product for Linux, I set the ess-site.el file for R, xlisp-stat, and S version 4. I.e., ;; (1.5) Require the needed dialects for your setup. ;;(require 'essd-s+3) (require 'essd-r) (require 'essd-xls) ;;(require 'essd-sas) ;;(require 'essd-s3) ;;
2003 Jun 23
3
FW: S4 classes, creating in C
I am using C code to create an S4 object based on Douglas Bates's example in his lecture notes on <http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Tutorials/RExtensions/slide s.pdf> http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Tutorials/RExtensions/slides .pdf e.g. SEXP La_DGE_dc(SEXP A) { SEXP aa = PROTECT(duplicate(A)); SEXP adims, pivot, val; int
2004 Jan 29
3
Developmental version of Matrix package for R-1.9.0
I recently uploaded a developmental version of the Matrix package, Matrix_0.6-1.tar.gz, to CRAN where it is in the src/contrib/1.9.0/Other directory. It requires some of the packages that will appear in R-1.9.0. This version marks a major redesign of the Matrix package to use S4 classes and methods and to incorporate sparse matrix manipulations using routines from TAUCS
2004 Oct 06
1
R 2.0.0: namespaces, S4 classes & versioned package installation: failure to resolve correct pkg version
Hi, further down from the problem I asked about yesterday I encounter the following problem (please appologize for the lengthy mail - I have not found a brief example making the issue clear): - using R packages making use of namespaces & - S4 classes when using --with-package-versions in the install call: Pkgs install ok and the first pkg 'base' can be loaded in R
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
2010 Oct 04
1
S4 class help pages [Sec=Unclassified]
Hi, I am working on producing an R package containing mostly S4 classes and methods. I have generated and filled out all the necessary .Rd files but find that once installed I am unable to access help pages for the classes using the ?package::classname-class syntax that is suggested when using the ?? apropos search. This lists my package classes and the class help pages. Instead, the
2006 Nov 21
3
Fitting mixed-effects models with lme with fixed error term variances
Dear R users, I am writing to you because I have a few question on how to fix the error term variances in lme in the hope that you could help me. To my knowledge, the closest possibility is to fix the var-cov structure, but not the whole var-cov matrix. I found an old thread (a few years ago) about this, and it seems that the only alternative is to write the likelihood down and use optim or a
2012 Mar 01
2
Julia
My purpose in mentioning the Julia language (julialang.org) here is not to start a flame war. I find it to be a very interesting development and others who read this list may want to read about it too. It is still very much early days for this language - about the same stage as R was in 1995 or 1996 when only a few people knew about it - but Julia holds much potential. There is a thread about
2006 Mar 05
3
Where to declare S4 classes?
Dear listers, I am making a trial to move from S3 to S4... I have created some classes of interest and they work acceptably well for the purpose. I am now wondering how to make them operate in a package. In clear when a package is loaded (eg library(mypackage)) where should I put the class descriptions:
2007 May 14
2
lmer function
Does anyone know if the lmer function of lme4 works fine for unbalanced designs? I have the examination results of 1000 pupils on three subjects, one score every term. So, I have three scores for English (one for every term), three scores for maths etc. However, not everybody was examined in maths, not everybody was examined in English etc, but everybody was in effect examined on four subjects. I
2003 Oct 23
1
Variance-covariance matrix for beta hat and b hat from lme
Dear all, Given a LME model (following the notation of Pinheiro and Bates 2000) y_i = X_i*beta + Z_i*b_i + e_i, is it possible to extract the variance-covariance matrix for the estimated beta_i hat and b_i hat from the lme fitted object? The reason for needing this is because I want to have interval prediction on the predicted values (at level = 0:1). The "predict.lme" seems to
2008 Sep 09
1
building a package that contains S4 classes and methods
Hello R users, I am trying to make a my first package and I get an error that I can understand. The package is build out of three files (one for functions, 1 for s4 classes and 1 for s4 methods). Once I source them I run package.skeleton( name="TDC" ) within a R session and I get Creating directories ... Creating DESCRIPTION ... Creating Read-and-delete-me ... Saving functions and
2004 Mar 16
1
lme(nlme) error message
Dear Friends, I am writing to seek any help on "lme" error message. I am using lme to do Mixed-model linear regression. I use my simulated data. However, sometimes, I get the following error message, which I do not understand. "Error in solve.default(pdMatrix(a, fact=TRUE)): system is computationally sigular" I would appreciate any help about it. Thanks a lot Jingyuan Fu
2007 Feb 08
2
Timings of function execution in R [was Re: R in Industry]
On 2/8/07, Albrecht, Dr. Stefan (AZ Private Equity Partner) <stefan.albrecht at apep.com> wrote: > Dear all, > > Thanks a lot for your comments. > > I very well agree with you that writing efficient code is about optimisation. The most important rules I know would be: > - vectorization > - pre-definition of vectors, etc. > - use matrix instead of data.frame > - do
2008 Jul 25
1
S4 class and Package NAMESPACE [NC]
Hello, I am trying to make a R package with S4 classes. To do so, i do as usual (when no S4 were involved, i.e without NAMESPACE file) and I've got errors in class refering to other classes in the package. So I use a NAMESPACE file to declare classes, it works fine, but now I have to declare each functions in the NAMESPACE file. Since I have a lot of functions, it's not very easy.
2012 Dec 08
1
namespace S3 and S4 generic imports cannot both be satisfied:
PkgA wishes to write a method for 'unique' on S4 class 'A'. ?Methods indicates that one should setGeneric("unique") setClass("A") unique.A <- function(x, incomparables=FALSE, ...) {} setMethod(unique, "A", unique.A) Both S3 and S4 methods need to be exported in the NAMESPACE import(methods) S3method(unique, A)
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
2006 Jan 20
1
Problem loading package with version, S4 classes and NAMESPACE
I've run into a problem that I hope has an obvious solution. The sp package uses S4 classes and has a NAMESPACE, and when installed without package versions, runs OK, passes R CMD check, and so on. A user reported that he installed it --with-package-versions, and that from then on it would fail at first use of a class defined in the package. I've reconstructed the problem in a