Skip to content

Combine arguments with the same description to one \item#70

Merged
MichaelChirico merged 1 commit intomasterfrom
comb-args
Oct 14, 2024
Merged

Combine arguments with the same description to one \item#70
MichaelChirico merged 1 commit intomasterfrom
comb-args

Conversation

@MichaelChirico
Copy link
Copy Markdown
Collaborator

This makes the set of \\item values the same between master and #61. Next will be to put those arguments in the same order too.

Code for analyzing the \arguments{\item} entries:

library(tools)

args_on_branch = function(branch) {
  system(paste('git checkout', branch))
  rd = Sys.glob("man/*.Rd")
  args = lapply(rd, function(f) {
    arguments = Filter(\(x) attr(x, "Rd_tag") == "\\arguments", parse_Rd(f))
    if (!length(arguments)) return(NULL)
    sapply(Filter(\(x) attr(x, "Rd_tag") == "\\item", arguments[[1L]]), \(x) unlist(x[[1]]))
  })
  names(args) = rd
  args
}

old = args_on_branch('master')
new = args_on_branch('roxygen')

@MichaelChirico MichaelChirico merged commit 3ee080c into master Oct 14, 2024
@MichaelChirico MichaelChirico deleted the comb-args branch October 14, 2024 04:11
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

Successfully merging this pull request may close these issues.

1 participant