Skip to content

nlapply to include metadata from data.frame #500

@dokato

Description

@dokato

Occasionally it happened to me that I needed to get some metadata information about the neuron that is kept in data.frame attribute. For example, I have a function that does action A if the neuron has soma, and action B if it doesn't. So far to achieve that I had to work around nlapply. I thought that including such metadata as attributes during iteration would be nice though. I.e.:

soma_radius <- function(n) {
  if (isTRUE(n$soma))
    n$d[n$d$Parent == -1,"W"]
  else 
   0
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions