reformat {drpop} | R Documentation |
A function to reorder the columns of a data table/matrix/data frame and to change factor variables to numeric.
Description
A function to reorder the columns of a data table/matrix/data frame and to change factor variables to numeric.
Usage
reformat(data, capturelists)
Arguments
data |
The data table/matrix/data frame which is to be checked. |
capturelists |
The vector of column names or locations for the capture history list columns. |
Value
data
With reordered columns so that the capture history columns are followed by the rest.
Examples
data = matrix(sample(c(0,1), 2000, replace = TRUE), ncol = 2)
x = matrix(rnorm(nrow(data)*3, 2, 1), nrow = nrow(data))
data = cbind(x, data)
result<- reformat(data = data, capturelists = c(4,5))
[Package drpop version 0.0.3 Index]