neuromorpho_field_counts: Get the number of different entries for a neuromorpho neuron...

View source: R/search.R

neuromorpho_field_countsR Documentation

Get the number of different entries for a neuromorpho neuron field

Description

Returns a vector of counts for every field entry for a given neuromorpho neuron field. E.g. you can find out how many neurons there are in the neuromorpho.org repository for each species it has data on.

Usage

neuromorpho_field_counts(
  field = "species",
  neuromorpho_url = "http://neuromorpho.org",
  ...
)

Arguments

field

a valid neuron field, as returned by neuromorpho_fields

neuromorpho_url

the base URL for querying the neuromorpho database, defaults to http://neuromorpho.org

...

methods passed to neuromorpho_async_req, or in some cases, neuromorphr:::neuromorpho_fetch

Details

All the data fields, and their entries, can be seen and explored on neuromorpho.org at http://neuromorpho.org/MetaData.jsp. Counts can be seen as pie charts under the 'browse' tab at http://neuromorpho.org, for example, http://neuromorpho.org/byspecies.jsp.

See Also

neuromorpho_search, neuromorpho_field_entries, neuromorpho_fields

Examples

## Not run: 
# Get counts for the number of neurons the repository has, by species
species.count = neuromorpho_field_counts(field = "species")
species.count.sorted = sort(species.count,decreasing=TRUE)
species.count.top = c(species.count.top[1:7], 
                      sum(species.count.sorted[8:length(species.count.sorted)]))
names(species.count.top)[length(species.count.top)] = "other"

# Plot
pie(x=species.count.top, labels = names(species.count.top), 
    main="neuron morphologies from different species")


## End(Not run)

jefferislab/neuromorphr documentation built on April 25, 2023, 9:07 p.m.