Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roxygenise arguments to new lines and indented to 4 spaces #1514

Closed
LouisLeNezet opened this issue Sep 19, 2023 · 1 comment
Closed

Roxygenise arguments to new lines and indented to 4 spaces #1514

LouisLeNezet opened this issue Sep 19, 2023 · 1 comment

Comments

@LouisLeNezet
Copy link

Hi,

I'm working on a package with multiple function and S4 methods.
Sometimes the S4 methods arguments are put on a single line (> 80 characters) and sometimes not.

For example

#' @title Is informative
#' @docType methods
setGeneric("is_informative", signature = "obj",
    function(obj, ...) standardGeneric("is_informative")
)

#' @export
#' @rdname is_informative
#' @aliases is_informative,character
#' @docType methods
setMethod("is_informative", "character",
    function(
        obj, avail, affected, informative = "AvAf", missid = "0"
    ) {
    }
)

#' @export
#' @rdname is_informative
#' @aliases is_informative,Pedigree
#' @docType methods
#' @param reset If `TRUE`, the `id_inf` column is reset
setMethod("is_informative", "Pedigree", function(
    obj, col_aff = NULL, informative = "AvAf", missid = "0", reset = FALSE
) {
})

Give me

\docType{methods}
\name{is_informative}
\alias{is_informative}
\alias{is_informative,character-method}
\alias{is_informative,character}
\alias{is_informative,Pedigree-method}
\alias{is_informative,Pedigree}
\title{Is informative}
\usage{
is_informative(obj, ...)

\S4method{is_informative}{character}(obj, avail, affected, informative = "AvAf", missid = "0")

\S4method{is_informative}{Pedigree}(
  obj,
  col_aff = NULL,
  informative = "AvAf",
  missid = "0",
  reset = FALSE
)
}

Would it be possible to set the max line length to 80 and to indent the arguments by 4 spaces instead of 2 ?

Thanks for your help !

@hadley
Copy link
Member

hadley commented Nov 1, 2023

It's not, sorry.

@hadley hadley closed this as completed Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants