make_frag_object {archeofrag}R Documentation

Makes a "frag.object" object.

Description

Makes a "frag.object" object.

Usage

make_frag_object(cr, sr, fragments)

Arguments

cr

A matrix or a data frame with two columns giving the vertex id of each pair of connected fragments.

sr

Optional. A matrix or a data frame with two columns: the first gives the fragment id, the second gives the "similarity group" id. Optional if mode is "cr".

fragments

A matrix or a data frame with information about each fragment. The first column must contain the fragments' id.

Details

This function checks the dataset and returns a "frag.object" which can be turned into a fragmentation graph using the make_cr_graph, make_sr_graph, or make_crsr_graph functions.

Value

An object of "frag.object" class.

Author(s)

Sebastien Plutniak <sebastien.plutniak at posteo.net>

Examples

cr.df <- matrix(c(1,2, 1,3, 2,3, 4,5, 4,6, 7,8), ncol=2, byrow=TRUE)
sr.df <- matrix( c(1,1, 9,1, 10,1, 11,2, 12,2, 13,2), ncol=2, byrow=TRUE)
fragments.df <- data.frame(1:13, letters[1:13]) 

make_frag_object(cr=cr.df, fragments=fragments.df)
make_frag_object(cr=cr.df, sr=sr.df, fragments=fragments.df)

[Package archeofrag version 0.8.2 Index]