I would like to use the "create.matrix" function (R package "fossil") to create a matrix of taxa, localities, time and abundance.
In the function, time is specified by the arguments "time.col" (= column name or number containing the time periods) and "time" (= which time periods to keep for the matrix). In my data table, time is specified as a calendar date (d.m.y: e.g. 31.12.2022).
How should time ("time periods") be specified or formatted in the data table to be used by the create.matrix function?
How should time periods be specified in the "time" argument?
I want to create a species by (locality by date) matrix (a part of the data is attached). Some localities were sampled only once, some several times. As "time period" in the argument "time" I want to use the date of sampling (column "date" in the dataset), but I do not know how to specify it in the code below ("????"):
Function:
df