This simple function reads a point pattern dataset from a file
containing the cartesian coordinates of its points,
and optionally the mark values for these points.
The file identified by
filename in directory
should be a text file that can be read using
Thus, each line of the file (except possibly the first line)
contains data for one point in the
point pattern. Data are arranged in columns. There should be either
two columns (for an unmarked point pattern) or more columns (for a
marked point pattern).
header=FALSE then the first two columns of data
will be interpreted as the \(x\) and \(y\) coordinates
of points. Remaining columns, if present, will be interpreted as
containing the marks for these points.
header=TRUE then the first line of the file should contain
string names for each of the columns of data. If there are columns
y then these will be taken as the
cartesian coordinates, and any remaining columns will be taken as
the marks. If there are no columns named
then the first and second columns will be taken as the cartesian
If a logical vector is provided for
factor.marks the length
should equal the number of mark columns (a shorter
is recycled to this length). This vector is then used to determine
which mark columns should be interpreted as factors. Note: Strings will
not be interpreted as factors if the corresponding entry in
Note that there is intentionally no default for
The window of observation should be specified.
If you really need to estimate the window, use the