[R-pkg-devel] checking S3 generic/method consistency ... NOTE
Daniel Marcelino
dmarcelino at live.com
Fri Jul 24 02:21:42 CEST 2015
That should work then, I confused myself how to properly document S3 methods using Roxygen. Thanks for this.
Daniel
________________________________
> Date: Thu, 23 Jul 2015 16:41:37 -0600
> Subject: Re: [R-pkg-devel] checking S3 generic/method consistency ... NOTE
> From: ucfagls at gmail.com
> To: dmarcelino at live.com
> CC: r-package-devel at r-project.org
>
> Hi Daniel
>
> You should only neee
>
> #' @export
>
> in your roxygen markup as roxygen (well recent versions anyway) are
> able to do the right thing and work out what needs to go into the
> NAMESPACE file. You don't need @method now, except in cases where there
> is ambiguity about the method/class, which shouldn;t be the case here.
>
> See: http://r-pkgs.had.co.nz/namespace.html#exports
>
> HTH
>
> G
>
> On 23 July 2015 at 15:21, Daniel Marcelino
> <dmarcelino at live.com<mailto:dmarcelino at live.com>> wrote:
> Hi, I would like to know how you are calming down the R check. I've an
> issue with the `head` method. I'm incorporating a head for data base,
> but nothing that I add in the function file seems to be able to
> silence the R check. Below is what I have:
>
> checking S3 generic/method consistency ... NOTE
> Found the following apparent S3 methods exported but not registered:
> head.SQLiteConnection
>
>
> #' Return the first n elements of a SQLiteConnection object
> #'
> #' If a database connection is selected, returns a dataframe of table names.
> #' If a table name is also supplied, the first n rows from the table
> are returned.
> #'
> #' @param x A database connection object or a table name.
> #' @param \dots Additional arguments
> #' @param table character specifying a table
> #' @param n integer: Number of rows to output
> #' @param temp logical should the function list the temp tables
> #'
> #' @export head.SQLiteConnection
> #' @method head SQLiteConnection
> #' @importFrom RSQLite dbGetQuery
> #' @importFrom utils head
> #' @rdname head
> head.SQLiteConnection <- function(x, table = NULL, n = 10L, temp =
> FALSE, ...){
> if(is.null(table)){
> if(temp){
> RSQLite::dbGetQuery(x, "SELECT type, name, tbl_name FROM
> sqlite_temp_master;", ...)
> } else RSQLite::dbGetQuery(x, "SELECT type, name, tbl_name FROM
> sqlite_master;", ...)
>
> } else {
> RSQLite::dbGetQuery(x, sprintf("SELECT * FROM %s LIMIT %d;", table,
> n), ...)
> }
> }
>
>
>
> Daniel
> ______________________________________________
> R-package-devel at r-project.org<mailto:R-package-devel at r-project.org>
> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
>
>
> --
> Gavin Simpson, PhD
More information about the R-package-devel
mailing list