similar to: warning creating an as.array method in a package

Displaying 20 results from an estimated 10000 matches similar to: "warning creating an as.array method in a package"

2010 Dec 09
1
warning creating an as.array method in a package
I posted on this topic to r-help, but never got a sufficient answer, so I'm reposting here. [Env: R 2.11.1, Win Xp, using Eclipse/StatET] In a package I'm working on, I want to create as.matrix() and as.array() methods for a particular kind of object (log odds ratios). These are returned in a loddsratio object as the $coefficients component, a vector, but really reflect an underlying
2010 Dec 16
1
defining a formula method for a weighted lm()
In the vcdExtra package on R-Forge, I have functions and generic methods for calculating log odds ratios for R x C x strata tables. I'd like to define methods for fitting weighted lm()s to the resulting loddsratio objects, but I'm having problems figuring out how to do this generally. # install.packages("vcdExtra", repos="http://R-Forge.R-Project.org")
2023 Apr 01
2
Autocompletion for the new S3 generic @ method?
I agree, this is a good idea and would be very helpful in interactive contexts. I have a draft patch implementing this feature here: https://github.com/r-devel/r-svn/pull/122 (Append ?.patch? to the URL to get a raw patch.) Regards, Tomasz > On Mar 31, 2023, at 2:11 PM, Karolis K <karolis.koncevicius at gmail.com> wrote: > > Hello, > > In the current R-devel @ is S3
2010 Nov 11
1
exploratory analysis of large categorical datasets
Dear List, I am looking to perform exploratory analyses of two (relatively) large datasets of categorical data. The first one is a binary 80x100 matrix, in the form: matrix(sample(c(0,1),25,replace=TRUE), nrow = 5, ncol=5, dimnames = list(c( "group1", "group2","group3", "group4","group5"), c("V.1", "V.2", "V.3",
2023 Mar 31
1
Autocompletion for the new S3 generic @ method?
Hello, In the current R-devel @ is S3 generic, so we can do things like - for example - use it to extract matrix rows by name: .S3method("@", "mm", function(object, name) object[name,]) m <- structure(matrix(rnorm(20), ncol=2), dimnames=list(paste0("row", 1:10), paste("col", 1:2)), class="mm") m at row1 However, seems like
2011 Mar 23
2
system.file() to read a text file from a vignette
[Env: R 2.12.2, WinXp] In a vignette for the vcdExtra package, I had a text file, tv.dat under data/, that I used in the vignette as <<tv1,results=verbatim>>= tv.data<-read.table(system.file("data","tv.dat",package="vcdExtra")) head(tv.data,5) @ I was told that this now generates a warning for non-Rdata files in R CMD check. But I'm now
2013 Sep 12
6
declaring package dependencies
I received the following email note re: the vcdExtra package > A vcd update has shown that packages TIMP and vcdExtra are not > declaring their dependence on colorspace/MASS: see > > http://cran.r-project.org/web/checks/check_results_vcdExtra.html But, I can't see what to do to avoid this, nor understand what has changed in R devel. Sure enough, CRAN now reports errors in
2010 Feb 14
1
How S3method() is implemented and called? And when to use it?
R-exts.pdf discribes S3method a little bit. But I want to understand more on how it is called, implemented and when to use it. I don't find it in an R session. But I see S3method() in some NAMESPACE files. > S3method Error: object 'S3method' not found > ?S3method No documentation for 'S3method' in specified packages and libraries: you could try '??S3method' I
2009 May 27
1
"Error: package/namespace load failed"
I am writing my first R package, and I have been getting the following series of errors when I run R CMD check: * checking S3 generic/method consistency ... WARNING Error: package/namespace load failed for 'REEMtree' Call sequence: 2: stop(gettextf("package/namespace load failed for '%s'", libraryPkgName(package)), call. = FALSE, domain = NA) 1: library(package,
2013 Mar 02
3
print method like print.anova()
I have a print method for a set of statistical tests, vcdExtra::CMHtest, for which I'd like to have more sensible printing of pvalues, as in print.anova(). [Testing this requires the latest version of vcdExtra, from R-Forge **|install.packages("vcdExtra", repos="http://R-Forge.R-project.org")|** ] With my current print method, I get results like this, but all Prob values
2015 Jul 07
3
List S3 methods and defining packages
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", instead of the actual package name (see below for the first rows). Is this normal
2004 Oct 17
2
Errors while compiling packages with namespace?
Hello, I try to set up namespaces for packages. It is fine for several of them, except one whose compilation fails (under Windows XP & R 2.0.0): ---------- Making package svViews ------------ adding build stamp to DESCRIPTION installing NAMESPACE file and metadata Error in parse(file, n, text, prompt) : syntax error on line 21 Execution halted make[2]: *** [nmspace] Error 1 make[1]: ***
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called directly by users. rms uses generic functions defined in other packages. For example there is a latex method in the Hmisc package, and rms has a latex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms. I use:
2006 Sep 01
1
as.environment(NULL)
Hi In NEWS, it says R CMD check now tests that the package can be loaded, and that the package and namespace (if there is one) can each be loaded in startup code (before the standard packages are loaded). For package "onion", I think I have followed all of sections 1.6.1 - 1.6.6 of R-exts, and it passes R CMD check for R-2.3.1. However, using R version 2.4.0 Under
2019 May 14
2
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
CCing r-devel. On Tue, 14 May 2019 at 02:11, Pavel Krivitsky <pavel at uow.edu.au> wrote: > > Dear All, > > I've run into this while updating a package with unfortunately named > legacy functions. It seems like something that might be worth changing > in R, and I want to get a sense of whether this is a problem before > submitting a report to the Bugzilla. > >
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)
2013 Apr 24
1
Problem with S3 method dispatch and NAMESPACE
I have updated the rms package to extensively use NAMESPACE. I cannot get certain S3 methods to dispatch. For example I have in NAMESPACE S3method(anova, rms) S3method(latex, anova.rms) anova.rms produces an object of class "anova.rms" and there is a latex.anova.rms function in rms. But when I do latex(anova(fit)) I get an invocation of latex.default. I have tried using
2010 Apr 13
2
Generating model formulas for all k-way terms
For the vcdExtra package, I'm exploring methods to generate and fit collections of glm models, and handling lists of such model objects, of class "glmlist". The simplest example is fitting all k-way models, from k=0 (null model) to the model with the highest-order interaction. I'm having trouble writing a function, Kway (below) to do what is done in the example below >
2007 Nov 05
2
namespace crash on S3method("as.ff",function)
Dear all, I have defined a generic as.ff(x, ...) and a method as.ff.function(x, ...) which converts a standard R function x into a chunked version operating on large ff objects. Everything works fine, but when registering S3method("as.ff",function) in NAMESPACE, the installation fails with some kind of parsing error: adding build stamp to DESCRIPTION installing NAMESPACE file
2009 Apr 11
1
Error in R CMD check 2.8.1
Env: R 2.8.1, Win Xp, Eclipse/StatET In a .Rd file, I have an example containing the lines: # calculate Y M, using polynomial contrasts trends <- as.matrix(VocabGrowth) %*% poly(8:11, degree=3) colnames(trends)<- c("Linear", "Quad", "Cubic") [At the risk of a long message, I'll append the complete .Rd file at the end of this message, in case this was