Skip to content

Instantly share code, notes, and snippets.

@rBatt
Created June 16, 2016 21:43
Show Gist options
  • Select an option

  • Save rBatt/81e7ab5a258a2eb46388c6b2c075c5bb to your computer and use it in GitHub Desktop.

Select an option

Save rBatt/81e7ab5a258a2eb46388c6b2c075c5bb to your computer and use it in GitHub Desktop.
subset neus for jho
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)
@rBatt
Copy link
Copy Markdown
Author

rBatt commented Jun 16, 2016

@jahoey for you

@rBatt
Copy link
Copy Markdown
Author

rBatt commented Jun 16, 2016

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