mark_names {groupedHyperframe}R Documentation

Mark Names

Description

Get the names of marks. Assign a name to marks, when markformat is 'vector'.

Usage

mark_names(x)

mark_name(x) <- value

Arguments

x

a ppp.object

Details

Syntactic sugar mark_name<-() converts a ppp.object of markformat 'vector' into markformat 'dataframe', and name this ncol-1L data.frame marks by the user-specified value.

Value

Function mark_names() returns the names of the marks of a ppp.object, when its markformat is 'dataframe'. Otherwise, an error is returned.

Syntactic sugar mark_name<-() returns a ppp.object of markformat 'dataframe'.

Examples

library(spatstat.data)
mark_names(betacells)
# ?waka
tryCatch(mark_names(waka), error = identity)
waka2 = waka
mark_name(waka2) = 'dbh' # tree diameter at breast height `dbh`
mark_names(waka2)
unstack(waka) # no name
unstack(waka2) # has name

[Package groupedHyperframe version 0.2.1 Index]