View source: R/t_weights_sequencer.R
t_weights_sequencer | R Documentation |
Create the time-dependent weights data
t_weights_sequencer(weights_information, weight = "length", nodes_id = "name")
weights_information |
a data.frame that must contain a 'nodes_id' column and several 'weight' columns.
Weight columns are named with the string contained in the 'weight' input and the relative year (4 digits format),
separated by an underscore (e.g. when |
weight |
a character object containing the label of the columns whose weight change with time |
nodes_id |
a character object containing the label of the columns that uniquely identify reaches. |
a data frame with columns 'name', 'year', and 'weight' to be used in the function t_index_calculation
weights_dataframe <- data.frame("id" = c("1", "2", "3", "4", "5"),
"weight_1900" = c(10, 15, 100, 50, 40),
"weight_1950"= c(11, 16, 90, 55, 45),
"weight_2000"= c(13, 19, 80, 49, 44))
weights_metadata <- t_weights_sequencer(weights_dataframe, weight = "weight", nodes_id = "id")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.