Created
June 16, 2016 21:43
-
-
Save rBatt/81e7ab5a258a2eb46388c6b2c075c5bb to your computer and use it in GitHub Desktop.
subset neus for jho
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library("data.table") | |
| load("clean.neus.RData") | |
| s2c <- function (x, type = "list") | |
| { | |
| as.call(lapply(c(type, x), as.symbol)) | |
| } | |
| colsuwant <- c("depth","btemp","stemp","bsalin","ssalin") | |
| jho_cneus <- clean.neus[spp=="Paralichthys dentatus", structure(lapply(eval(s2c(colsuwant)),meanna, na.rm=TRUE),.Names=colsuwant),by=c("reg","datetime","year","stratum","lon","lat","haulid","season","station","spp","common")] | |
| setkey(jho_cneus, datetime, year, stratum, station) |
Author
Author
install.packages(c("raster", "data.table"))
# bonus
install.packages("devtools")
library("devtools")
install_github("rbLib")
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jahoey for you