format_data_PPBstats.data_network: Check and format the data to be used by PPBstats functions...

Description Usage Arguments Details Value Author(s) See Also

View source: R/format_data_PPBstats.data_network.R

Description

format_data_PPBstats checks and formats the data to be used by PPBstats functions for network analyses

Usage

1
2
3
format_data_PPBstats.data_network(data, network_part = c("unipart",
  "bipart"), network_split = c("germplasm", "relation_year_start"),
  vertex_type = NULL)

Arguments

data

The data frame to format, see details.

network_part

element of the network, it can be "unipart" or "bipart"

network_split

For network_part = "unipart" and vertex_type = "location", split of the data that can be "germplasm" or "relation_year_start"

vertex_type
  • for unipart network : "seed_lots" or "location"

  • for bipart network : c("germplasm", "location")

Details

The data frame are different regarding type of network

See the book for more details here.

Value

It returns a igraph object coming from igraph::graph_from_data_frame().

For unipart network on seed lots, it a list of one element

For unipart network on location

For bipart network, it returns a list with as many elements as year in the data as well as all years merged in the first element of the list. If no year are provided into the data, all information are merged.

Author(s)

Pierre Riviere

See Also

format_data_PPBstats


priviere/PPBstats documentation built on May 6, 2021, 1:20 a.m.