Skip to content

Commit

Permalink
fixes #23 neus datetime provided in updated #18
Browse files Browse the repository at this point in the history
@mpinsky good call, datetime exists in new data set; @bselden might want to check with your sources, but this approach infers far less; datetime is specified
  • Loading branch information
rBatt committed Dec 15, 2015
1 parent cd240f2 commit 39f2c94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/clean.columns.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ clean.columns.neus <- function(X){
X[,haulid:=paste(formatC(cruise, width=6, flag=0), formatC(station, width=3, flag=0), formatC(stratum, width=4, flag=0), sep='-')]

# date, time, datetime
X[,datetime:=as.POSIXct(paste(as.character(year),substr(cruise,5,6),"01",sep="-"), format="%Y-%m-%d", tz="GMT")]
X[,datetime:=as.POSIXct(datetime, tz="GMT")]

# season
# neus already has its own season definition
Expand Down
1 change: 1 addition & 0 deletions R/clean.names.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ clean.names.neus <- function(X){
"SVSPP" = "SID",
"CATCHSEX" = "sex",
"YEAR" = "year",
"EST_TOWDATE" = "datetime",
"SEASON" = "season",
"LAT" = "lat",
"LON" = "lon",
Expand Down

0 comments on commit 39f2c94

Please sign in to comment.