Skip to contents

Convert dataframes into nested lists according to each required case

Value

a nested list where each element at the root level contains all details for each tag and its sensor details.

a nested list where each element at the root level contains all details for each tagged individual.

Methods


Method build_tag_with_sensor_list()

Given a dataframe with the tag and sensor details, it returns 4-level nested list containing all details about each tag along with their sensor details.

Usage

NestedListBuilder$build_tag_with_sensor_list(
  df,
  tag_prefix,
  sensor_prefix,
  root_field_names
)

Arguments

df

dataframe with all tag and sensor details

tag_prefix

string with the expected tag field prefix

sensor_prefix

string with the expected sensor field prefix

root_field_names

string vector with the names of the outer element of the built list


Method build_tagged_individual_list()

Given a dataframe with the individual, tag and sensor and tagged_individual details it returns 3-level nested list containing all such details

Usage

NestedListBuilder$build_tagged_individual_list(
  df,
  ind_prefix,
  tag_prefix,
  sensor_prefix,
  tagged_ind_prefix,
  root_field_names
)

Arguments

df

dataframe with all tag and sensor details

ind_prefix

string with the expected individual field prefix

tag_prefix

string with the expected tag field prefix

sensor_prefix

string with the expected sensor field prefix

tagged_ind_prefix

string with the expected tagged_individual field prefix

root_field_names

string vector with the names of the outer element of the built list in the strict order of (individual, tag, sensor)


Method clone()

The objects of this class are cloneable with this method.

Usage

NestedListBuilder$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.