im.csv.read: Read csv File to Incidence Matrix

View source: R/incidence.R

im.csv.readR Documentation

Read csv File to Incidence Matrix

Description

Wrapper around the read_csv function from the readr package \insertCitewickham_readr_2024lakhesis. Read a .csv file in which the first column represents row elements and the second column represents column elements, and convert it into an incidence matrix.

Usage

im.csv.read(
  filename,
  header = FALSE,
  characterencoding = "iso-8859-1",
  remove.hapax = FALSE
)

Arguments

filename

The filename to uploaded (must be in .csv format).

header

If the .csv file contains a header. Default is FALSE.

characterencoding

File encoding as used by locale. Default is "iso-8859-1" to handle special characters.

remove.hapax

Remove any row or column which has a sum of 1 (i.e., is only attested once), since they do not directly contribute to the result of the seriation. Default is FALSE.

Value

An incidence matrix of binary values (0 = row/column occurrence is absence; 1 = row/column occurrence is present).

References

\insertAllCited

lakhesis documentation built on June 22, 2024, 10:27 a.m.