rename_fude: Rename Fude Polygon data

View source: R/rename_fude.R

rename_fudeR Documentation

Rename Fude Polygon data

Description

rename_fude() renames the elements of a Fude Polygon data object returned by read_fude() by replacing local government codes in the element names with corresponding municipality names, making the object easier to read.

Usage

rename_fude(data, suffix = TRUE, romaji = NULL, quiet = TRUE)

Arguments

data

A Fude Polygon data object returned by read_fude().

suffix

Logical. If FALSE, municipality suffixes are removed from renamed element names. For example, romaji suffixes such as "-shi" and "-ku" are removed when romaji is used.

romaji

Character scalar or NULL. If NULL, Japanese municipality names are used. Otherwise, municipality names are converted to romaji. Supported values are: "upper" for upper case, "title" for title case, and "lower" for lower case.

quiet

Logical. If FALSE, print the mapping from old names to new names.

Value

A Fude Polygon data object with renamed elements.

See Also

read_fude()

Examples

path <- system.file("extdata", "castle.zip", package = "fude")
d <- read_fude(path, quiet = FALSE)
d2 <- rename_fude(d)
d2 <- rename_fude(d, suffix = FALSE)
d2 <- rename_fude(d, romaji = "upper")


fude documentation built on April 5, 2026, 9:06 a.m.