Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/r-tmap/tmap
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed Sep 8, 2023
2 parents fe921e9 + a2b52fb commit a4bff56
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ examples
demo
test
sandbox
output
^output$
local
LICENSE
README
Expand Down
39 changes: 39 additions & 0 deletions tests/testing_column_names_v4.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: "Testing - Column Names"
author: "Robin Lovelace"
date: "`r Sys.Date()`"
output: html_document
editor_options:
chunk_output_type: console
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, fig.width = 9)
```

# Instructions

Open the tmap repository as RStudio project.
Set Knit Directory (via drop-down menu of the Knit button in RStudio) to Project Directory.

```{r echo=FALSE,message=FALSE,fig.height = 2}
library(devtools)
load_all()
data(World,metro,land)
World$`Unusual column name` = World$HPI
# Test in v4 (2023-08-4):
tm_shape(World) +
tm_polygons("Unusual column name")
# Error: Visual values used for the variable, "fill" of layer function "tm_polygons" are incorrect.
# Test in v3: works!
remotes::install_version("tmap", version = "3.3")
detach("package:tmap", unload = TRUE)
library(tmap)
World$`Unusual column name` = World$HPI
tm_shape(World) +
tm_polygons("Unusual column name")
```
2 changes: 1 addition & 1 deletion vignettes/tmap-getstarted.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Maps can also be made with one function call.
This function is `qtm`:

```{r}
qtm(World, fill = "HPI", fill.pallete = "RdYlGn")
qtm(World, fill = "HPI", fill.palette = "RdYlGn")
```

### Tips 'n Tricks
Expand Down

0 comments on commit a4bff56

Please sign in to comment.