tokami / TropFishR

Tropical Fisheries Analysis with R
24 stars 19 forks source link

No $score_mat in the result of response surface analysis #23

Closed jethroppaPH closed 6 years ago

jethroppaPH commented 6 years ago

Good afternoon, it's me again.

I followed your tutorial here, and you presented the code:

# find 3 highest score values
n <- length(res_RSA$score_mat)
best_scores <- sort(res_RSA$score_mat,partial=n-0:2)[n-0:2]
ind <- arrayInd(which(res_RSA$score_mat %in% best_scores),
                dim(res_RSA$score_mat))
Ks <- as.numeric(rownames(res_RSA$score_mat)[ind[,1]])
Linfs <- as.numeric(colnames(res_RSA$score_mat)[ind[,2]])

...

But when I entered the first line, and I looked in my environment, n is 0L. I inspected res_RSA and score_mat is not present.

res_rsa

I am currently using TropFishR 1.6.0 under Linux Mint 18.3 with R version 3.4.4 (2018-03-15).

tokami commented 6 years ago

@jethroppaPH, thank you for spotting this bug! This has been fixed on the dev2.0 branch, which is the most up to date branch. Please install with: devtools::install_github("tokami/TropFishR",ref="dev2.0")