path_fishers <- mt_example()
mt_read(path_fishers)
## Reduce the mount of data read this might provide memory advantages
## and speed up reading
mt_read(path_fishers, col_select = c(
"location-long", "location-lat",
"timestamp", "individual-local-identifier"
))
## Read Galapagos Albatross data that has been annotated
mt_read(mt_example("Galapagos_Albatrosses-1332012225316982996.zip"))
## Notice this produces a warning as some units are not recognized
## This can be prevented by installing the units
if (FALSE) {
units::install_unit("gC", "g", "Grams of carbon")
}
if (FALSE) {
## Reading can also be manipulted to speed up or reduce memory consumption
## Here we assume the Galapagos albatross data has been downloaded
mt_read("~/Downloads/Galapagos Albatrosses.csv")
## Exclude the column 'eobs:accelerations-raw'
mt_read("~/Downloads/Galapagos Albatrosses.csv",
col_select = (!`eobs:accelerations-raw`)
)
## Only read records from July 2008 using a system pipe where the data
## is already filtered before reading into R
mt_read(pipe('cat "~/Downloads/Galapagos Albatrosses.csv" | grep "2008-07\\|time"'))
}
Run the code above in your browser using DataLab