similar to: str and s3 classes

Displaying 20 results from an estimated 20000 matches similar to: "str and s3 classes"

2017 Aug 08
0
Inheritance for S3 classes
You might find http://adv-r.hadley.nz/s3.html to be helpful (in particular, http://adv-r.hadley.nz/s3.html#constructors-1, gives my advice about subclass constructors) Hadley On Mon, Aug 7, 2017 at 7:06 PM, Kym Nitschke <kym.nitschke at icloud.com> wrote: > Hi R Users, > > I am relatively new to programming in R ? so I apologise if my questions appear ?dumb?. > > I am using
2016 Jun 18
1
vignette output: word_document problems
Hello: Clicking "Knit Word" in RStudio 0.99.893 with R 3.3.0, works fine with a vignette with "output: word_document". However, "R CMD build" throws the following error: $ R CMD build pkgW2vignettes * checking for file ?pkgW2vignettes/DESCRIPTION? ... OK * preparing ?pkgW2vignettes?: * checking DESCRIPTION meta-information ... OK * installing the
2013 Apr 01
1
missing exported methods when compiling vignettes in R 3.0.0 RC
A new problem has cropped up with compiling vignettes for my package BayesFactor. I'm not sure when it started, but I can tell you it didn't occur on R 2.15.3, and it does on 3.0.0 RC (2013-03-31 r62463) (session info is at the bottom of this message). I have defined methods for which.min and which.max for a class (I've defined both S3 and S4 methods for the class
2017 Aug 08
4
Inheritance for S3 classes
Hi R Users, I am relatively new to programming in R ? so I apologise if my questions appear ?dumb?. I am using a package that defines a number of S3 classes. I want to create an S3 child class of one of these classes. The parent class has a contractor with many arguments. I have been having difficulty writing the child class contractor. I have been unable to find a good reference in the internet
2006 Mar 07
3
Making an S3 object act like a data.frame
"[.ggobiDataset" <- function(x, ..., drop=FALSE) { x <- as.data.frame(x) NextMethod("[", x) } "[[.ggobiDataset" <- function(x, ..., drop=FALSE) { x <- as.data.frame(x) NextMethod("[[", x) } "$.ggobiDataset" <- function(x, ..., drop=FALSE) { x <- as.data.frame(x) NextMethod("$", x) } > class(x) [1]
2007 Jun 01
2
HTML vignette browser
Hi, this is tangentially related to the recent discussion on vignettes. vignette() currently produces a listing of available vignettes, but these are not clickable. Since R has a browseURL() function, it seems natural to have a version that produces HTML with clickable links. Here's an attempt at that: source("http://dsarkar.fhcrc.org/R/vignette-browser.R") browseVignettes()
2015 Jun 23
3
Plans to improve reference classes?
Could of requests: 1) Is there any example or writeup on the difficulties of extending reference classes across packages? Just so I can fully understand the issues. 2) In what sorts of situations does the performance of reference classes cause problems? Sure, it's an order of magnitude slower than constructing a simple environment, but those timings are in microseconds, so one would need a
2012 Jul 03
2
Problem in vignette packaging of Sweave in utils package
In ?Sweave, it refers to Sweave User Manual. In the doc folder of utils package, I see "Sweave.pdf". However, I can't find it from within R > vignette("Sweave User Manual") Warning message: vignette ?Sweave User Manual? not found > browseVignettes("utils") No vignettes found by browseVignettes("utils") > library(help=utils) does not
2017 Jun 12
2
Paths in knitr
Hi Yihui, Hi Duncan, I corrected my typo. Unfortunately knitr did not find my plots in the directory where they reside which is different from the Rmd document. The documentation of knitr says: base.dir: (NULL) an absolute directory under which the plots are generate root.dir: (NULL) the root directory when evaluating code chunks; if NULL, the directory of the input document will be used
2020 Nov 01
2
vignettes present in 2 folders or won't work
Dear all, I am struggling with an issue related to static vignettes: they work, but only when present in double in the tarball -- in the folder inst/doc and vignettes; see below for details. Details: I am pre-compiling heavy vignettes thanks to the vignette builder R.rsp. So basically, I have PDF files which I want the package to use as Vignettes. For this, I have the following in my
2009 Jun 18
1
Learning S3
Hi all, Do you know of any good resources for learning how S3 works? I've some how become familiar with it by reading many small pieces, but now that I'm teaching it to students I'm wondering if there are any good resources that describe it completely, especially in a reader-friendly way. So far I've found: *
2016 Jul 12
3
Forking and adapting an R package
Hello. I'm trying to adapt the package ?hexbin? to suit my needs. This is the first time I do this. I've read a bit through Hadley's ?R packages?, but now I'm pretty lost (from a workflow point of view). I am using RStudio and Hadley's devtools. So I forked the repo I want to adapt: https://github.com/grssnbchr/hexbin and cloned it using RStudio (I created a new project).
2016 Jul 12
3
Forking and adapting an R package
Hello. I'm trying to adapt the package ?hexbin? to suit my needs. This is the first time I do this. I've read a bit through Hadley's ?R packages?, but now I'm pretty lost (from a workflow point of view). I am using RStudio and Hadley's devtools. So I forked the repo I want to adapt: https://github.com/grssnbchr/hexbin and cloned it using RStudio (I created a new project).
2004 Apr 18
2
Error in gam?
I'm having some problems using variable names containing spaces (using backticks) with gam (mgcv 0.9-6, R 1.8.1). Some toy code to reproduce my problem is below. Am I doing something wrong, or should I pass this bug on to Simon Wood? (Or do I need to rename my variables to get rid of the spaces?) Thanks, Hadley library(mgcv) test <- data.frame(a = c(1:10), `a b` = c(1:10)^2,
2010 Sep 01
1
S3 method for package listed in suggest/enhance
Hi all, The profr package provides a method for displaying its output with ggplot: ggplot.print. You don't need this ggplot2 to use profr, so ggplot2 is listed under enhances in the DESCRIPTION file. If I have just S3method(ggplot, profr) in my NAMESPACE, then I get: ** testing if installed package can be loaded Error : object 'ggplot' not found whilst loading namespace
2017 Jun 12
0
Paths in knitr
Will there be anything wrong if you do not set these options? Regards, Yihui -- https://yihui.name On Mon, Jun 12, 2017 at 2:24 AM, <G.Maubach at weinwolf.de> wrote: > Hi Yihui, > Hi Duncan, > > I corrected my typo. Unfortunately knitr did not find my plots in the > directory where they reside which is different from the Rmd document. > > The documentation of knitr
2016 Jul 12
2
[R] Forking and adapting an R package
On 12/07/2016 7:28 AM, timo at timogrossenbacher.ch wrote: > Hello. > > I'm trying to adapt the package ?hexbin? to suit my needs. This is the first > time I do this. I've read a bit through Hadley's ?R packages?, but now I'm > pretty lost (from a workflow point of view). I am using RStudio and Hadley's > devtools. > > So I forked the repo I want to
2015 Jul 27
2
Método S3 paquete
Hola Carlos, Muchas gracias por el enlace, me ha sido de gran ayuda. Ya he entendido cómo funciona el sistema S3. Un saludo, Guillermo > Hola, ¿qué tal? > > Sigue http://www.datanalytics.com/2011/08/04/desarrollo-de-paquetes-con-r-iv-funciones-genericas/ > a rajatabla y lo tendrás. > > Un saludo, > > Carlos J. Gil Bellosta > http://www.datanalytics.com > >
2015 Mar 12
2
Requirement for pandoc 1.12.3 in R 3.1.3
Thanks Brian. Indeed, the vignette is in markdown form. When I updated my system to R 3.1.3 I ran update.packages() and this seems to have upset things (including R-studio processing of markdown files). I tried removing rmarkdown and reverting to an older version so that my sessionInfo() is Loading required package: rmarkdown > sessionInfo() R version 3.1.3 (2015-03-09) Platform:
2018 Feb 19
4
Include pre-existing PDF files as vignettes in an R package?
Greetings. The group that I work with has just started using the approach outlined in Karl Broman's handy primer: http://kbroman.org/pkg_primer/pages/vignettes.html to create vignettes for a couple of R packages. This works fine as long as we have a current Rmd version of the vignette. But we have some old PDF documents that we'd like to include as vignettes as well. I'd like