-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy and source() the newsbss locally
better to have a static version as this might change later, and for ease of others' use
- Loading branch information
1 parent
0aa47e4
commit 9ef3e55
Showing
3 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# adapted/generalized from Steve Barbeaux' files for | ||
# generating SS files for EBS/AI Greenland Turbot | ||
# ZTA, 2013-05-08, R version 2.15.1, 32-bit | ||
|
||
BIN_AGE_DATA <- function(data,age_bins=seq(1,100,1)) | ||
{ | ||
age<-data.frame(AGE=c(1:max(data$AGE))) | ||
age$aBIN<-max(age_bins) | ||
n<-length(age_bins) | ||
for(i in 2:n-1) | ||
{ | ||
age$aBIN[age$AGE < age_bins[((n-i)+1)] ]<-age_bins[n-i] | ||
} | ||
data<-merge(data,age,all.x=T,all.y=F) | ||
data | ||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# adapted/generalized from Steve Barbeaux' files for | ||
# generating SS files for EBS/AI Greenland Turbot | ||
# ZTA, 2013-05-08, R version 2.15.1, 32-bit | ||
|
||
BIN_LEN_DATA <- function(data,len_bins=seq(1,100,1)) | ||
{ | ||
length<-data.frame(LENGTH=c(1:max(data$LENGTH))) | ||
length$BIN<-max(len_bins) | ||
n<-length(len_bins) | ||
for(i in 2:n-1) | ||
{ | ||
length$BIN[length$LENGTH < len_bins[((n-i)+1)] ]<-len_bins[n-i] | ||
} | ||
data<-merge(data,length,all.x=T,all.y=F) | ||
data | ||
} | ||
|
This file contains 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