read_events {linbin} | R Documentation |
Read File as Event Table
Description
Reads a file in table format and attempts to coerce it to an event table.
Usage
read_events(file, from.col = 1, to.col = 2, sep = "", header = TRUE, ...)
Arguments
file |
Name, |
from.col , to.col |
Names or indices of the columns containing event endpoints. Values are swapped as needed to ensure that |
sep |
Character separating values on each line of the file. If |
header |
Logical value indicating whether the file contains column names as its first line. If |
... |
Additional arguments, of the form |
Details
The file is read into R by calling read.table
. Any of its arguments can be set by passing additional tag = value
pairs. from.col
and to.col
are renamed to "from" and "to" as needed. Since these column names must be unique, other columns cannot also be called "from" or "to".
See Also
events
and as_events
for creating event tables from existing objects.