aboutsummaryrefslogtreecommitdiff
path: root/test.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2016-11-17 18:14:32 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2016-11-17 18:23:31 +0100
commitf3f415520c89f9d8526bf6fadc862ebd44be220d (patch)
treee80d26e3b4f56ebe872888bed8f01a21d49b7ff4 /test.R
parentf52fffd9eab13b7902bf767dd9cd7f0e7abf8069 (diff)
Remove trailing whitespace, clean headers
Also ignore test.R in the top level directory, as it is not meant to be public
Diffstat (limited to 'test.R')
-rw-r--r--test.R45
1 files changed, 0 insertions, 45 deletions
diff --git a/test.R b/test.R
deleted file mode 100644
index 1a81652d..00000000
--- a/test.R
+++ /dev/null
@@ -1,45 +0,0 @@
-library(pkgdown)
-library(testthat)
-
-debug(pkgdown:::topic_index)
-
-build_reference_index(".")
-
-extract_tag(rd[[1]], "tag_title") # gives "\n"
-extract_tag(rd[[4]], "tag_title") # gives the title
-
-extract_tag(rd[[1]], "tag_alias") # one aliase
-extract_tag(rd[[13]], "tag_alias") # two aliases
-
-library(magrittr)
-
-extract_tag_1 <- function(x, tag) {
- x %>%
- purrr::keep(inherits, tag) %>%
- unlist %>%
- paste(collapse = "") %>%
- trimws
-}
-
-extract_tag <- function(x, tag) {
- x %>%
- purrr::keep(inherits, tag) %>%
- purrr::map_chr(c(1, 1))
-}
-
-extract_tag_1 <- function(x, tag) {
- x %>%
- purrr::keep(inherits, tag) %>%
- purrr::map_chr(function(x) trimws(paste(x, collapse = " ")))
-}
-
-subset(rd[[1]][[1]],
-
-sapply(extract_tag_1(rd[[1]], "tag_title"), function(x) trimws(paste(x, collapse = " ")))
-
-extract_tag_1(rd[[1]], "tag_title")
-extract_tag_1(rd[[4]], "tag_title")
-
-extract_tag_1(rd[[1]], "tag_alias") # one aliase
-extract_tag_1(rd[[13]], "tag_alias") # two aliases
-

Contact - Imprint