From db3dbabbf937935c67ead7e766d12cfbfae8b7ba Mon Sep 17 00:00:00 2001 From: Rich FitzJohn Date: Wed, 6 May 2015 14:20:50 +1000 Subject: [PATCH] Generate Rmd by default This is so often what is required. --- R/sowsear.R | 2 +- man/sowsear.Rd | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/R/sowsear.R b/R/sowsear.R index f537252..2e87942 100644 --- a/R/sowsear.R +++ b/R/sowsear.R @@ -51,7 +51,7 @@ process.sowsear <- function(blocks, type) { out } -sowsear <- function(script, type=NULL, output=NULL) { +sowsear <- function(script, type="Rmd", output=NULL) { types <- c("Rnw", "Rmd") if ( is.null(type) ) { if ( is.null(output) ) diff --git a/man/sowsear.Rd b/man/sowsear.Rd index 17c0e2f..01258b1 100644 --- a/man/sowsear.Rd +++ b/man/sowsear.Rd @@ -10,7 +10,7 @@ with three or more hashes ("###") are ignored. } \usage{ -sowsear(script, type=NULL, output=NULL) +sowsear(script, type="Rmd", output=NULL) } \arguments{ \item{script}{An R script file.} @@ -20,8 +20,9 @@ sowsear(script, type=NULL, output=NULL) the extension of \code{output}.} \item{output}{An output file name. If not given, it is constructed - from the input file name and the conversion type. At least one of - \code{output} and \code{type} must be given.} + from the input file name and the conversion type. If neither + \code{output} nor \code{type} are given, output will be an Rmd file + with the same base name as \code{script}.} } \value{ Invisible \code{TRUE} on success.