-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTEST_EMPE_dive_code.R
More file actions
32 lines (22 loc) · 883 Bytes
/
Copy pathTEST_EMPE_dive_code.R
File metadata and controls
32 lines (22 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
### This is some code to practice using Github
### YAY!!
### set working directory and download data
setwd("/Volumes/GoogleDrive-108505658869240529132/My Drive/Unfiltered_2019_EMPE/")
# download data
divetest<- fread("EMPE_2019_CACR_Pen3_Axy6_raw.csv",na.strings = c("", NA)); head(divetest)
# HI CAITIE AND PARKER!!!
### filter data
divet<- divet %>%
drop_na(Depth) %>%
rename(gspeed = `ground-speed`, TempC = `Temp. (?C)`) %>%
dplyr::select(Timestamp, Depth, Activity, gspeed, TempC)
### format time
divet$Timestamp <- as.POSIXct(divet$Timestamp, format = c("%m/%d/%Y %H:%M:%OS"), tz = "GMT")
### create TDR file
tdrX <- createTDR(time=divet$Timestamp,
depth=divet$Depth,
concurrentData=divet[, -c(1:2)],
dtime=1, file="EMPE_2019_CACR_Pen3_Axy6_raw.csv")
## Meep meep penguins!
### plot dives
plotTDR(tdrX)