Add text to map like raster::text()

st_txt(x, labels, halo = T, col = "black", hc = "white", hw = 0.1, ...)

Arguments

x

sf object

labels

character. Optional. Vector of labels with length(x) or a variable name from names(x)

halo

logical. If TRUE a 'halo' is printed around the text. and hw=0.1 can be modified to set the colour and width of the halo

col

character. Text color. If halo = TRUE, default is'black'

hc

character. Halo color. If halo = TRUE, default is 'white'

hw

numeric. Halo width. If halo = TRUE, default is '0.1'

...

other arguments passed to text function

Value

spatial text label