add_squids_to_df {squids} | R Documentation |
Add a column with SQUIDs to a data frame
Description
Add a column with SQUIDs to a data frame
Usage
add_squids_to_df(
x,
colName = "SQUID",
warnAgainstOverwriting = TRUE,
origin = Sys.time(),
follow = NULL,
followBy = NULL
)
Arguments
x |
The data frame |
colName |
The name of the column to add; set to |
warnAgainstOverwriting |
Whether to throw an error if a column with
name |
origin |
The origin to use when generating the SQUIDs. This allows
you to reproduce the same sequence of SQUIDs. You can easily get an
origin with |
follow |
A vector of one or more SQUIDs (or a list; lists are
recursively |
followBy |
When following a vector of SQUIDs, this can be used to specify the distance between the two vectors in centiseconds. |
Value
If colName = NULL
, the column with SQUIDs; otherwise, x
with
an additional column named with the value of colName
.
Examples
squids::add_squids_to_df(
mtcars
);