Skip to content

Commit

Permalink
another round
Browse files Browse the repository at this point in the history
  • Loading branch information
christophsax committed Dec 21, 2016
1 parent c6a718c commit 0ea0a4f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ travis
\.git
.git
.DS_Store
out
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ importFrom(graphics,par)
importFrom(graphics,plot)
importFrom(markdown,renderMarkdown)
importFrom(rmarkdown,draft)
importFrom(seasonal,seas)
importFrom(yaml,yaml.load)
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- updated README.md
- updated vignatte ('The paper') in '/x13story/vignettes/workflow.pdf'
- all stories in 'inst/stories' updated to use new functions.
- cleaned up NAMESPACE


0.0.1 2016-04-21
Expand Down
2 changes: 2 additions & 0 deletions R/parse_x13story.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#'
#' @param file path
#' @importFrom rmarkdown draft
#' @importFrom seasonal seas
#' @importFrom markdown renderMarkdown
#' @importFrom yaml yaml.load
#' @export
Expand All @@ -11,6 +12,7 @@ parse_x13story <- function(file){

# use namespace of rmarkdown somewhere, R CMD CHECK complains otherwise
if (FALSE) rmarkdown::draft()
if (FALSE) seasonal::seas()

# run R chunks im Rmd file and save snapshots in object.
tempR <- tempfile(fileext = ".R")
Expand Down
7 changes: 6 additions & 1 deletion R/x13page.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ x13page <- function(m, series = "main", pdf = TRUE){
} else {
s <- series(m, series = series)
}
prettify(graphics::plot(s, ylab = series, main = ""))

# essentialy from prettify() which does not work in functions so far
op <- graphics::par(family = "Palatino")
on.exit(graphics::par(op))
graphics::plot(s, ylab = series, main = "", bty = "l")
graphics::grid()
}
} else {
ee <- parent.frame()
Expand Down
2 changes: 1 addition & 1 deletion tests/simpleTest.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (Sys.getenv("TRAVIS") != ""){


message("Testing Skeleton")
sk <- file.path(Sys.getenv("TRAVIS_BUILD_DIR"), "inst/rmarkdown/templates/x13story/skeleton/skeleton.Rmd")
sk <- file.path(Sys.getenv("TRAVIS_BUILD_DIR", "."), "inst/rmarkdown/templates/x13story/skeleton/skeleton.Rmd")
sk <- normalizePath(sk)
x13story::parse_x13story(file = sk)
rmarkdown::render(sk, x13story::x13story())
Expand Down

0 comments on commit 0ea0a4f

Please sign in to comment.