normalise_swc: Normalise an SWC format block of neuron morphology data

View source: R/neuron.R

normalise_swcR Documentation

Normalise an SWC format block of neuron morphology data

Description

Normalise an SWC format block of neuron morphology data

Usage

normalise_swc(
  x,
  requiredColumns = c("PointNo", "Label", "X", "Y", "Z", "W", "Parent"),
  ifMissing = c("usedefaults", "warning", "stop"),
  includeExtraCols = TRUE,
  defaultValue = list(PointNo = seq.int(nrow(x)), Label = 2L, X = NA_real_, Y = NA_real_,
    Z = NA_real_, W = NA_real_, Parent = NA_integer_)
)

Arguments

x

A data.frame containing neuron morphology data

requiredColumns

Character vector naming columns we should have

ifMissing

What to do if x is missing a required column

includeExtraCols

Whether to include any extra columns included in x

defaultValue

A list containing default values to use for any missing columns

Details

Note that row.names of the resultant data.frame will be set to NULL so that they have completely standard values.

Value

A data.frame containing the normalised block of SWC data with standard columns in standard order.

See Also

as.neuron.data.frame, seglist2swc


nat documentation built on May 29, 2024, 10:36 a.m.