data(camtraps)
# no problems/malfunction
camop_no_problem <- cameraOperation(CTtable = camtraps,
stationCol = "Station",
setupCol = "Setup_date",
retrievalCol = "Retrieval_date",
writecsv = FALSE,
hasProblems = FALSE,
dateFormat = "dmy"
)
# with problems/malfunction
camop_problem <- cameraOperation(CTtable = camtraps,
stationCol = "Station",
setupCol = "Setup_date",
retrievalCol = "Retrieval_date",
writecsv = FALSE,
hasProblems = TRUE,
dateFormat = "dmy"
)
# The examples above specified dateFormat using lubdridate package, which is more intuitive.
# Alternatively one can used in base-R date conversions (strptime) as below:
# with problems/malfunction / dateFormat in strptime format
camop_problem_oldformat <- cameraOperation(CTtable = camtraps,
stationCol = "Station",
setupCol = "Setup_date",
retrievalCol = "Retrieval_date",
writecsv = FALSE,
hasProblems = TRUE,
dateFormat = "%d/%m/%Y"
)
camop_no_problem
camop_problem
camop_problem_oldformat
Run the code above in your browser using DataLab