lsp_restructure: Changes structure of the lsp object

View source: R/lsp_restructure.R

lsp_restructureR Documentation

Changes structure of the lsp object

Description

Converts a list-column with signatures into many numeric columns

Usage

lsp_restructure(x)

Arguments

x
  • an lsp object

Value

Object of class lsp. It has several columns: (1) id - an id of each window. For irregular windows, it is the values provided in the window argument, (2) na_prop - share (0-1) of NA cells for each window, (3) one or more columns representing values of the signature

Examples


library(stars)

landcover = read_stars(system.file("raster/landcover2015s.tif", package = "motif"))

landcover_cove = lsp_signature(landcover, type = "cove", threshold = 0.9, window = 100)
landcover_cover = lsp_restructure(landcover_cove)
landcover_cover

lsp_add_sf(landcover_cover)

Nowosad/lopata documentation built on Aug. 27, 2024, 6 a.m.