geocompx / geocompx/tmap

Chapter 15 error, could not find function "tm_components"

Open
#15 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
32
Forks
9
PR merge metrics
No merged PRs in 30d

Description

In the Chapter 15: Arranging maps tutorial, the code chunk below from part 15.1, raises an error of "could not find function "tm_components"

tm_shape(slo_elev) +
  tm_raster(
    col.scale = tm_scale_continuous(values = "geyser", midpoint = NA)
  ) +  
  tm_title("Maribor", group_id = 1) +
  tm_inset(tmaptools::bb("Maribor"), group_id = 1) +
  tm_title("Ljubljana", group_id = 1) +
  tm_inset(tmaptools::bb("Ljubljana"), group_id = 1) +
  tm_title("Bled", group_id = 2) +
  tm_inset(tmaptools::bb("Bled"), group_id = 2) +
  tm_components(1, position = c("right", "bottom")) +
  tm_components(2, position = c("left", "top"))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Chapter 15: Arranging maps tutorial, part 15.1, and run the provided code chunk with the repository's current R mapping dependencies. Check how the documented API exposes tm_components and update the tutorial so the example runs without the function-not-found error. Done means the revised chunk executes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.