Learn R Programming

jpmesh (version 2.1.0)

meshcode_sf: Conversion to sf objects containing meshcode

Description

Convert and export meshcode area to sf.

Usage

meshcode_sf(data, mesh_var, .type, .keep_class = FALSE)

Arguments

data

data.frame

mesh_var

unquoted expressions for meshcode variable.

.type

Specify the subdivision if you want to get a 100m mesh.

.keep_class

Do you want to assign a class to the meshcode column in data.frame? If FALSE, it will be treated as a character type.

Value

sf object

Examples

Run this code
# NOT RUN {
d <- data.frame(id = seq.int(4),
            meshcode = rmesh(4),
            stringsAsFactors = FALSE)
meshcode_sf(d, meshcode)
# }

Run the code above in your browser using DataLab