CovsXVisit | R Documentation |
Produces a Covariate X Visit matrix for use in analyses
CovsXVisit(
object,
covs,
parks = NA,
points = NA,
years = NA,
times = NA,
visits = NA,
reps = NA,
output = "dataframe"
)
object |
A |
covs |
A character vector of one or more covariate names. Options inlcude:
|
parks |
A character vector of park codes. Only data from these parks will be returned. |
points |
A character vector of point names. Only data from these points will be returned. |
years |
A numeric vector. Returns data only from points where the years the point was visited matches one of the
values in |
times |
A numeric vector of length 1. Returns only data from points where the number of years that a point has been vistied
is greater or equal to the value of |
visits |
A length 1 numeric vector, defaults to |
reps |
A length 1 numeric vector,defaults to |
output |
Either "dataframe" (the default) or "list". Note that this must be in quotes. Determines the type of output from the function. |
This produces a Covariate(s) X Visit matrix for a NCRNbirds
object or a list
of such objects. Each row of the matrix
will correspond to a different point in a different year. The columns of the matrix will be the park code, the point name, the year
visited, and a column for each covariate at each visit. These columns will be called "Day1", "Day2" or "Humidity1", "Humidity2" etc. to indicate
the covariate and the visit.
If visits
is left as NA
then the visits used will be 1 through the number of visits indicated in the visits
slot.
Otherwise a numeric vector e.g. c(1,2) can be used to select which visits are used.
If the input object
is an NCRNbirds
object or a list of such objects, the function will use the getVisits
function to
retrieve the visit data. Currently if you supply a data.frame
as the object
the filtering by parks, points etc. will not occur,
all visits present in the input data.frame
will be present it the ouput data.frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.