Permalink
Browse files

misc

  • Loading branch information...
1 parent c524328 commit 3e92d604416a8e856800cb99d53b0d997bd696fa @jrnold committed Oct 14, 2012
Showing with 73 additions and 10 deletions.
  1. +1 −2 DESCRIPTION
  2. +1 −1 NAMESPACE
  3. +7 −7 R/write_stan.R
  4. +32 −0 man/writeStan.Rd
  5. +32 −0 man/write_stan.Rd
View
@@ -19,7 +19,6 @@ Suggests:
roxygen2
Collate:
'00-package.R'
- 'utilities.R'
'read_stan.R'
'run_stan.R'
- 'write.stan.R'
+ 'write_stan.R'
View
@@ -1,7 +1,7 @@
export(make_stan_names)
export(read_stan_csv)
export(run_stan_model)
-exportMethods(write.stan)
+exportMethods(writeStan)
import(mcmc4)
import(plyr)
import(stringr)
View
@@ -127,7 +127,7 @@ write_stan_default <- function(list, file = "standata.R", append = FALSE,
}
}
-##' Methods for function \code{write.stan}
+##' Methods for function \code{writeStan}
##'
##' This writes dump files, like \code{\link{dump}}, but with a few
##' tweaks to ensure that they will works as input for Stan.
@@ -139,15 +139,15 @@ write_stan_default <- function(list, file = "standata.R", append = FALSE,
##' @param envir \code{environment} In which to look for varaibles.
##' @param precheck \code{logical} Check for errors before writing to file.
##' @param width \code{numeric} Width of lines in the output file.
-##' @aliases write_stan-methods
-##' @aliases write_stan,character-method
-##' @aliases write_stan,list-method
+##' @aliases writeStan-methods
+##' @aliases writeStan,character-method
+##' @aliases writeStan,list-method
##' @export
-setGeneric("write_stan", function(list, ...) { standardGeneric("write.stan")})
+setGeneric("writeStan", function(list, ...) { standardGeneric("writeStan")})
-setMethod("write_stan", "character", write_stan_default)
+setMethod("writeStan", "character", write_stan_default)
-setMethod("write_stan", "list",
+setMethod("writeStan", "list",
function(list, ...) {
write.stan(names(list), envir=as.environment(list), ...)
})
View
@@ -0,0 +1,32 @@
+\name{writeStan}
+\alias{writeStan}
+\alias{writeStan-methods}
+\alias{writeStan,character-method}
+\alias{writeStan,list-method}
+\title{Methods for function \code{writeStan}}
+\arguments{
+ \item{list}{Data objects to write to file}
+
+ \item{file}{\code{character} output file name}
+
+ \item{append}{\code{logical} If \code{TRUE}, then append
+ to the file.}
+
+ \item{scalars}{\code{character} Names of scalar
+ variables.}
+
+ \item{envir}{\code{environment} In which to look for
+ varaibles.}
+
+ \item{precheck}{\code{logical} Check for errors before
+ writing to file.}
+
+ \item{width}{\code{numeric} Width of lines in the output
+ file.}
+}
+\description{
+ This writes dump files, like \code{\link{dump}}, but with
+ a few tweaks to ensure that they will works as input for
+ Stan.
+}
+
View
@@ -0,0 +1,32 @@
+\name{write_stan}
+\alias{write_stan}
+\alias{write_stan-methods}
+\alias{write_stan,character-method}
+\alias{write_stan,list-method}
+\title{Methods for function \code{write.stan}}
+\arguments{
+ \item{list}{Data objects to write to file}
+
+ \item{file}{\code{character} output file name}
+
+ \item{append}{\code{logical} If \code{TRUE}, then append
+ to the file.}
+
+ \item{scalars}{\code{character} Names of scalar
+ variables.}
+
+ \item{envir}{\code{environment} In which to look for
+ varaibles.}
+
+ \item{precheck}{\code{logical} Check for errors before
+ writing to file.}
+
+ \item{width}{\code{numeric} Width of lines in the output
+ file.}
+}
+\description{
+ This writes dump files, like \code{\link{dump}}, but with
+ a few tweaks to ensure that they will works as input for
+ Stan.
+}
+

0 comments on commit 3e92d60

Please sign in to comment.