csvToUMF(filename, long=FALSE, type, species, ...)
FALSE
if file is in long format or TRUE
if
file is in long format (see Details)unmarked
. The .csv file can be in one of 2 formats: long or
wide. See the first 2 lines of the examples for what these
formats look like.The .csv file is formatted as follows:
head(read.csv(system.file("csv","frog2001pcru.csv", package="unmarked")))
# examine a correctly formatted wide .csv
head(read.csv(system.file("csv","widewt.csv", package="unmarked")))
# convert them!
dat1 <- csvToUMF(system.file("csv","frog2001pcru.csv", package="unmarked"),
long = TRUE, type = "unmarkedFrameOccu")
dat2 <- csvToUMF(system.file("csv","frog2001pfer.csv", package="unmarked"),
long = TRUE, type = "unmarkedFrameOccu")
dat3 <- csvToUMF(system.file("csv","widewt.csv", package="unmarked"),
long = FALSE, type = "unmarkedFrameOccu")
Run the code above in your browser using DataLab