im.csv.read {lakhesis} | R Documentation |
Read csv File to Incidence Matrix
Description
Wrapper around the read_csv
function from the readr
package (Wickham et al. 2024). 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 |
header |
If the |
characterencoding |
File encoding as used by |
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 |
Value
An incidence matrix of binary values (0 = row/column occurrence is absence; 1 = row/column occurrence is present).
References
Wickham H, Hester J, Bryan J (2024). readr: Read Rectangular Text Data. R package version 2.1.5, https://github.com/tidyverse/readr, https://readr.tidyverse.org.