Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed Jan 14, 2025
1 parent 1454e0f commit 48ac563
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ ubuntu_17_installation.sh
^tests/testthat/Rplots.pdf$
^\.covrignore$
^vignettes$
man/figures/shiny_plot.jpg
man/figures/shiny_view.jpg
6 changes: 3 additions & 3 deletions examples/tm_logo.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ data(World)

tm_shape(World) +
tm_polygons("HPI", fill.scale = tm_scale_intervals(values = "RdYlGn")) +
tm_logo(c("https://www.r-project.org/logo/Rlogo.png",
system.file("img/tmap.png", package="tmap"))) +
tm_logo("http://blog.kulikulifoods.com/wp-content/uploads/2014/10/logo.png",
tm_logo(c("https://www.r-project.org/logo/Rlogo.png",
system.file("help", "figures", "logo.png", package = "tmap"))) +
tm_logo("http://blog.kulikulifoods.com/wp-content/uploads/2014/10/logo.png",
height=5, position = c("left", "top")) +
tm_format("World")
Binary file removed inst/img/tmap.png
Binary file not shown.
6 changes: 3 additions & 3 deletions man/tm_logo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 0 additions & 22 deletions vignettes/adv_groups.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,11 @@ knitr::opts_chunk$set(
fig.width = 8,
comment = "#>"
)
hook_output <- knitr::knit_hooks$get("output")
knitr::knit_hooks$set(output = function(x, options) {
lines <- options$output.lines
if (is.null(lines)) {
return(hook_output(x, options)) # pass to default hook
}
x <- unlist(strsplit(x, "\n"))
more <- "..."
if (length(lines)==1) { # first n lines
if (length(x) > lines) {
# truncate the output, but add ....
x <- c(head(x, lines), more)
}
} else {
x <- c(more, x[lines], more)
}
# paste these lines together
x <- paste(c(x, ""), collapse = "\n")
hook_output(x, options)
})
```


```{r, echo = FALSE, message = FALSE}
library(tmap)
tmap_options(scale = 0.75)
```


Expand Down

0 comments on commit 48ac563

Please sign in to comment.