I'm building a large program with many different people contributing to the coding in R and so it needs a well-articulated design spec. The program will have many different functions that must interact with each other, but the individual functions will be written by different people. I'm curious if anyone has an R-specific SRS document to share that they have used for a similar purpose listing the objectives for each function, class definition, generics, what the function inherits from, and so on, or perhaps even a useful template for such work. Thank you in advance. Harold [[alternative HTML version deleted]]
On Wed, 7 Sep 2016, Doran, Harold wrote:> I'm building a large program with many different people contributing to > the coding in R and so it needs a well-articulated design spec. The > program will have many different functions that must interact with each > other, but the individual functions will be written by different people.Harold, You need a version control system; I strongly recommend git <https://git-scm.com/>. Rich
I use Mercurial for this. -----Original Message----- From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Rich Shepard Sent: Wednesday, September 07, 2016 11:56 AM To: r-help at r-project.org Subject: Re: [R] R-specific Software Requirement Specification On Wed, 7 Sep 2016, Doran, Harold wrote:> I'm building a large program with many different people contributing > to the coding in R and so it needs a well-articulated design spec. The > program will have many different functions that must interact with > each other, but the individual functions will be written by different people.Harold, You need a version control system; I strongly recommend git <https://git-scm.com/>. Rich ______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Yes! ... and you might consider writing your specifications along with example R code using rmarkdown. The Rstudio GUI has a nice interface and support tools (e.g. for compiling and previewing the doc) for writing rmarkdown, but you can also load and use the package through whatever R interface you prefer. Rstudio also has good support for git: https://jennybc.github.io/2014-05-12-ubc/ubc-r/session03_git.html Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Sep 7, 2016 at 8:56 AM, Rich Shepard <rshepard at appl-ecosys.com> wrote:> On Wed, 7 Sep 2016, Doran, Harold wrote: > >> I'm building a large program with many different people contributing to >> the coding in R and so it needs a well-articulated design spec. The >> program will have many different functions that must interact with each >> other, but the individual functions will be written by different people. > > > Harold, > > You need a version control system; I strongly recommend git > <https://git-scm.com/>. > > Rich > > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
On 07/09/2016 11:35 AM, Doran, Harold wrote:> I'm building a large program with many different people contributing to the coding in R and so it needs a well-articulated design spec. The program will have many different functions that must interact with each other, but the individual functions will be written by different people. > > I'm curious if anyone has an R-specific SRS document to share that they have used for a similar purpose listing the objectives for each function, class definition, generics, what the function inherits from, and so on, or perhaps even a useful template for such work.The Rd help pages do some of this. They aren't so good at describing the class hierarchy but are good at specifying individual functions. Duncan Murdoch
This is in fact a *very* good suggestion, Duncan. One could easily rewrite any existing R function by looking at the help page I believe. So, I could in fact begin by writing the help page which we know details the function inputs, details about each argument, what the function is expected to output etc. I suppose it is easy enough to add an "inherits from" or outputs an object of class "xyz" to this for my purpose. -----Original Message----- From: Duncan Murdoch [mailto:murdoch.duncan at gmail.com] Sent: Wednesday, September 07, 2016 12:46 PM To: Doran, Harold <HDoran at air.org>; r-help at r-project.org Subject: Re: [R] R-specific Software Requirement Specification On 07/09/2016 11:35 AM, Doran, Harold wrote:> I'm building a large program with many different people contributing to the coding in R and so it needs a well-articulated design spec. The program will have many different functions that must interact with each other, but the individual functions will be written by different people. > > I'm curious if anyone has an R-specific SRS document to share that they have used for a similar purpose listing the objectives for each function, class definition, generics, what the function inherits from, and so on, or perhaps even a useful template for such work.The Rd help pages do some of this. They aren't so good at describing the class hierarchy but are good at specifying individual functions. Duncan Murdoch
You might also or instead look at the roxygen way of doing things, which maps to Rd files, but are much easier to write. In R Studio, Code -> Insert Roxygen skeleton does this for you from an existing function. See: http://r-pkgs.had.co.nz/man.html #' title goes here #' #' description goes here #' #' @param p1 desc of p1 #' @param p2 #' @param ... #' @return #' @export #' @imports #' @author #' @seealso #' @examples #' example lines foo <- function (p1, p2, ... ) { } On 9/7/2016 12:46 PM, Duncan Murdoch wrote:> On 07/09/2016 11:35 AM, Doran, Harold wrote: >> I'm building a large program with many different people contributing >> to the coding in R and so it needs a well-articulated design spec. The >> program will have many different functions that must interact with >> each other, but the individual functions will be written by different >> people. >> >> I'm curious if anyone has an R-specific SRS document to share that >> they have used for a similar purpose listing the objectives for each >> function, class definition, generics, what the function inherits from, >> and so on, or perhaps even a useful template for such work. > > The Rd help pages do some of this. They aren't so good at describing > the class hierarchy but are good at specifying individual functions. > > Duncan Murdoch >