-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Re-clean and re-build package for 0.4.0 * Patch badge embedding in README * Tweak assemble draft and vignette text * Fix typos and final devtools::release() issues
- Loading branch information
1 parent
ef85422
commit 93fe6dd
Showing
45 changed files
with
17,005 additions
and
684 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
language: r | ||
r: | ||
- 3.4 | ||
- 3.5 | ||
- 3.6 | ||
- oldrel | ||
- release | ||
- devel | ||
os: | ||
- linux | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
#' Assemble multiple patterns into a single draft object | ||
#' | ||
#' When working with multiple patterns that will be woven into a tetmplate, | ||
#' When working with multiple patterns that will be woven into a template, | ||
#' it makes sense to have all patterns stored in a central object. This | ||
#' function creates that object from a named vector of filenames to be used | ||
#' in further generation, importing the files via | ||
#' \code{\link[heddlr]{import_pattern}}. | ||
#' | ||
#' @param ... A named vector of filenames which will be imported as | ||
#' patterns stored in the returned draft, with the names used as indices. | ||
#' Files should be plaintext. | ||
#' Files should be plain text. | ||
#' | ||
#' @return A list ("draft") object containing the imported patterns. | ||
#' | ||
#' @export | ||
|
||
assemble_draft <- function(...) { | ||
patterns <- list(...) | ||
if (length(patterns) < 1) stop("No arguments provided to assemble_draft.") | ||
patterns <- unlist(patterns, recursive = FALSE) | ||
if (!is.vector(patterns)) stop("Argument 1 must be a named vector.") | ||
if (any(names(patterns) == "") | length(patterns) != length(names(patterns))) stop("All arguments must be named.") | ||
|
||
draft <- vector("list", length = length(patterns)) | ||
|
||
for (i in seq_along(patterns)) { | ||
names(draft)[i] <- names(patterns)[i] | ||
draft[names(patterns)[i]] <- import_pattern(patterns[[i]]) | ||
} | ||
draft <- lapply(patterns, import_pattern) | ||
names(draft) <- names(patterns) | ||
draft | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#' @keywords internal | ||
"_PACKAGE" | ||
|
||
# The following block is used by usethis to automatically manage | ||
# roxygen namespace tags. Modify with care! | ||
## usethis namespace: start | ||
## usethis namespace: end | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.