Convert a data frame with two numbers (normally a beginning year and end year) into an incidences matrix whose rows are the intermediate numbers, and whose columns are the content of the names column.

incTime(data, name = "name", beginning = "birth", end= "death")

Arguments

data

a data frame a name and two numbers.

name

Column with the names (default= "name").

beginning

Column with the beginning number to include (default= "birth").

end

Column with the end number to include (default= "death").

Value

A data frame in which the two first columns are source and target. The rest of the columns are sim.=(1+threshold-real difference) and dist.=(difference between numbers)

Author

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

# From sociologists data data("sociologists") head(incTime(sociologists))[,1:5]
#> Auguste Comte Karl Marx Herbert Spencer Friedrich Engels #> 1798 1 0 0 0 #> 1799 1 0 0 0 #> 1800 1 0 0 0 #> 1801 1 0 0 0 #> 1802 1 0 0 0 #> 1803 1 0 0 0 #> William Graham Sumner #> 1798 0 #> 1799 0 #> 1800 0 #> 1801 0 #> 1802 0 #> 1803 0