Manipulate a number of Rd files
Rd_combo.RdManipulate a number of Rd files.
Details
Rd_combo parses each file in rd, applies f to the
Rd object, and applies the function .MORE (if supplied) on the
results of f.
A typical value for .MORE is reprompt or another
function that saves the resulting Rd object.
todo: Rd_combo is already useful but needs further work.
Examples
if (FALSE) { # \dontrun{
rdnames <- dir(path = "./man", pattern=".*[.]Rd$", full.names=TRUE)
## which Rd files don't have a value section?
counts <- unlist(Rd_combo(rdnames, function(x) length(Rdo_locate_core_section(x, "\value"))))
rdnames[counts == 0]
## reprompt all files
Rd_combo(rdnames, reprompt)
for(nam in rdnames) try(reprompt(nam))
for(nam in rdnames) try(reprompt(nam, sec_copy=FALSE))
} # }