cur_wd <- getwd()
setwd(tempdir())
# as for prompt() the default to save in current dir as "seq.Rd".
fnseq <- reprompt(seq)
# let's parse the saved Rd file
rdoseq <- parse_Rd(fnseq)
# the usage of 'seq' has several entries, parse them all
ut <- get_usage_text(rdoseq)
cat(ut,"\n")
utp <- parse_usage_text(ut)
# format some of them
as.character(utp[[1]])
deparse_usage1(utp[[1]]) # same
cat(deparse_usage1(utp[[2]]))
cat(as.character(utp[[2]])) # same
unlink(fnseq)
Run the code above in your browser using DataLab