devtools::install_github("adamdsmith/unmarked", ref = "fix_csvumf")
library(unmarked)
bat <- csvToUMF(filename="~/HHB/HHB Analysis/R Analysis/Unmarked/Single Season Analysis/HHB3.csv", long = TRUE, type = "unmarkedFrameOccu")
str(bat)
Formal class 'unmarkedFrameOccu' [package "unmarked"] with 5 slots ..@ y : 'matrix' int [1:45, 1:84] 1 0 0 1 0 0 0 0 0 0 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : NULL .. .. ..$ : NULL ..@ obsCovs :'data.frame': 3780 obs. of 19 variables: .. ..$ year : num [1:3780] 3 3 3 3 3 3 3 2 1 2 ... .. ..$ jdate : num [1:3780] -0.706 -0.718 -0.73 -0.741 -0.753 ... .. ..$ cycle : Factor w/ 4 levels "lac","mate","preg",..: 4 4 4 4 4 4 4 4 4 4 ... .. ..$ season : num [1:3780] 11 11 11 11 11 11 11 7 3 7 ... .. ..$ ssr : num [1:3780] 27 27 27 27 27 27 27 7 119 7 ... .. ..$ msw : num [1:3780] 6.16 6.16 6.16 6.16 6.16 ... .. ..$ myt : num [1:3780] 11.9 11.9 11.9 11.9 11.9 ... .. ..$ myr : num [1:3780] 6.64 6.64 6.64 6.64 6.64 ... .. ..$ myw : num [1:3780] 4.66 4.66 4.66 4.66 4.66 ... .. ..$ night : Factor w/ 756 levels "1-Aug-14","1-Aug-15",..: 738 33 61 91 123 153 181 735 29 30 ... .. ..$ mmt : num [1:3780] 9.78 9.78 9.78 9.78 9.78 ... .. ..$ mmr : num [1:3780] 0.0323 0.0323 0.0323 0.0323 0.0323 ... .. ..$ mst : num [1:3780] 12.9 12.9 12.9 12.9 12.9 ... .. ..$ month : num [1:3780] 1 1 1 1 1 1 1 2 2 2 ... .. ..$ year. : num [1:3780] 2017 2017 2017 2017 2017 ... .. ..$ mmStudyt : num [1:3780] 9.17 9.17 9.17 9.17 9.17 ... .. ..$ mmStudyr : num [1:3780] 12.2 12.2 12.2 12.2 12.2 12.2 12.2 4 4 4 ... .. ..$ mmStudyw : num [1:3780] 5.22 5.22 5.22 5.22 5.22 ... .. ..$ JulianDate: num [1:3780] 9 10 11 12 13 14 15 40 41 41 ... ..@ siteCovs:'data.frame': 45 obs. of 3 variables: .. ..$ mStudyt: num [1:45] 11.6 11.6 11.6 11.6 11.6 ... .. ..$ mStudyr: num [1:45] 9.52 9.52 9.52 9.52 9.52 ... .. ..$ mStudyW: num [1:45] 4.02 4.02 4.02 4.02 4.02 ... ..@ mapInfo : NULL ..@ obsToY : num [1:84, 1:84] 1 0 0 0 0 0 0 0 0 0 ...dat <- read.csv("~/HHB/HHB Analysis/R Analysis/Unmarked/Single Season Analysis/HHB3.csv")
sitecovs <- read.csv("~/HHB/HHB Analysis/R Analysis/Unmarked/Single Season Analysis/sitecovs3.csv" )
everything <- cbind(dat, sitecovs)
write.csv(everything, "~/HHB/HHB Analysis/R Analysis/Unmarked/Single Season Analysis/everything.csv", row.names = FALSE)
bat <- csvToUMF(filename = "~/HHB/HHB Analysis/R Analysis/Unmarked/Single Season Analysis/everything.csv", long = TRUE, type = "unmarkedFrameOccu")
str(bat)
Formal class 'unmarkedFrameOccu' [package "unmarked"] with 5 slots
..@ y : 'matrix' int [1:45, 1:84] 1 0 0 1 0 0 0 0 0 0 ...
.. ..- attr(*, "dimnames")=List of 2
.. .. ..$ : NULL
.. .. ..$ : NULL
..@ obsCovs :'data.frame': 3780 obs. of 19 variables:
.. ..$ year : num [1:3780] 3 3 3 3 3 3 3 2 1 2 ...
.. ..$ jdate : num [1:3780] -0.706 -0.718 -0.73 -0.741 -0.753 ...
.. ..$ cycle : Factor w/ 4 levels "lac","mate","preg",..: 4 4 4 4 4 4 4 4 4 4 ...
.. ..$ season : num [1:3780] 11 11 11 11 11 11 11 7 3 7 ...
.. ..$ ssr : num [1:3780] 27 27 27 27 27 27 27 7 119 7 ...
.. ..$ msw : num [1:3780] 6.16 6.16 6.16 6.16 6.16 ...
.. ..$ myt : num [1:3780] 11.9 11.9 11.9 11.9 11.9 ...
.. ..$ myr : num [1:3780] 6.64 6.64 6.64 6.64 6.64 ...
.. ..$ myw : num [1:3780] 4.66 4.66 4.66 4.66 4.66 ...
.. ..$ night : Factor w/ 756 levels "1-Aug-14","1-Aug-15",..: 738 33 61 91 123 153 181 735 29 30 ...
.. ..$ mmt : num [1:3780] 9.78 9.78 9.78 9.78 9.78 ...
.. ..$ mmr : num [1:3780] 0.0323 0.0323 0.0323 0.0323 0.0323 ...
.. ..$ mst : num [1:3780] 12.9 12.9 12.9 12.9 12.9 ...
.. ..$ month : num [1:3780] 1 1 1 1 1 1 1 2 2 2 ...
.. ..$ year. : num [1:3780] 2017 2017 2017 2017 2017 ...
.. ..$ mmStudyt : num [1:3780] 9.17 9.17 9.17 9.17 9.17 ...
.. ..$ mmStudyr : num [1:3780] 12.2 12.2 12.2 12.2 12.2 12.2 12.2 4 4 4 ...
.. ..$ mmStudyw : num [1:3780] 5.22 5.22 5.22 5.22 5.22 ...
.. ..$ JulianDate: num [1:3780] 9 10 11 12 13 14 15 40 41 41 ...
..@ siteCovs:'data.frame': 45 obs. of 5 variables:
.. ..$ mStudyt: num [1:45] 11.6 11.6 11.6 11.6 11.6 ...
.. ..$ mStudyr: num [1:45] 9.52 9.52 9.52 9.52 9.52 ...
.. ..$ mStudyW: num [1:45] 4.02 4.02 4.02 4.02 4.02 ...
.. ..$ region : num [1:45] 1 1 1 1 1 1 1 1 1 2 ...
.. ..$ treehab: num [1:45] 1 0 0 1 0 0 1 1 0 1 ...
..@ mapInfo : NULL
..@ obsToY : num [1:84, 1:84] 1 0 0 0 0 0 0 0 0 0 ...--
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "unmarked" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/unmarked/_leESWUENZA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to unmarked+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to unmarked+u...@googlegroups.com.
<csv_umf_fix_error.R>
<csv_umf_test.csv>
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.