bioacoustica.postAnnotation: Post an annotation to BioAcoustica

Description Usage Arguments Author(s) Examples

Description

Function to post a new annotation to the BioAcoustica repository.

Usage

1

Arguments

path

Relative path to the recording you wish to annotate.

type

The type of annotation you wish to make.

taxon

Taxa present in the annotated section.

start

Start time of annotated section in seconds.

end

End time of annotated section in seconds.

c

Authenticated CURL handle.

Author(s)

Ed Baker

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(path, type, taxon, start, end, c) {
  type_id <- as.character(subset(bioacoustica::bioacoustica.listTypes(), Type==type, select=Term.ID)[1,])
  extra_pars = list(
    'field_type[und]' = type_id,
    'field_taxonomic_name[und]' = taxon,
    'field_start_time[und][0][value]' = start,
    'field_end_time[und][0][value]' = end
  );
  DrupalR::drupalr.postComment(bioacoustica::bioacoustica.getHandle(), path, '', extra_pars, c);
}

BioAcoustica/bioacousticaR documentation built on May 5, 2019, 3:46 p.m.