Skip to content

Commit

Permalink
Fix path for THANKS
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Dec 4, 2012
1 parent d94eddb commit 346e144
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS
@@ -1,6 +1,8 @@
stringr 0.6.2
================

* fixed path in `str_wrap` example so works for more R installations.

* remove dependency on plyr

stringr 0.6.1
Expand Down
3 changes: 2 additions & 1 deletion R/wrap.r
Expand Up @@ -13,7 +13,8 @@
#' @return a character vector of reformatted strings.
#' @export
#' @examples
#' thanks <- str_c(readLines(R.home("doc/THANKS")), collapse = "\n")
#' thanks_path <- file.path(R.home("doc"), "THANKS")
#' thanks <- str_c(readLines(thanks_path), collapse = "\n")
#' thanks <- word(thanks, 1, 3, fixed("\n\n"))
#' cat(str_wrap(thanks), "\n")
#' cat(str_wrap(thanks, width = 40), "\n")
Expand Down
3 changes: 2 additions & 1 deletion man/str_wrap.Rd
Expand Up @@ -26,7 +26,8 @@
See \code{\link{strwrap}} for more details.
}
\examples{
thanks <- str_c(readLines(R.home("doc/THANKS")), collapse = "\\n")
thanks_path <- file.path(R.home("doc"), "THANKS")
thanks <- str_c(readLines(thanks_path), collapse = "\\n")
thanks <- word(thanks, 1, 3, fixed("\\n\\n"))
cat(str_wrap(thanks), "\\n")
cat(str_wrap(thanks, width = 40), "\\n")
Expand Down

0 comments on commit 346e144

Please sign in to comment.