
Read a colony snapshot-history table from a file
Source:R/readSnapshotHistory.R
readSnapshotHistory.RdReads a user-maintained longitudinal colony snapshot history (issue #167)
from a file into a data frame for checkSnapshotHistory. The
history is the single CSV a colony manager keeps between analyses: one row
per recorded snapshot in the 27-column version-1 schema (see
checkSnapshotHistory for the column groups). Excel
(.xls/.xlsx) and delimited text (.csv/.txt)
files are both accepted, mirroring readKinshipOverrides.
Excel files are read with every column as text and then the numeric columns
(e.g. schemaVersion) are converted to numbers, so an Excel file and a
delimited text file of the same table give the same result. A numeric column
that holds a value that is not a number is left as text and
checkSnapshotHistory stops, naming it.
Value
A data frame of the rows read from fileName. Validate it
with checkSnapshotHistory before use.
Details
This reader does not validate structure or domain — that is
checkSnapshotHistory's job, matching the reader/validator
sibling-pair convention.
Examples
history <- readSnapshotHistory(system.file("extdata", "examples",
"example_snapshot_history.csv",
package = "nprcgenekeepr"
))
history <- checkSnapshotHistory(history)