Professional Documents
Culture Documents
Guide
Guide
Main functions
1. Rapfish_execution
a. Produces Rapfish plots
b. Number of plots is equal to number of fields analysed
c. Produces Radar plots (10 fisheries per plot)
d. Produces csv files (labeled: Results_Field1.csv) which contain the
scores for each fisheries for each field.
e. Number of csv files is equal to number of fields analysed
2. Monte_Carlo_Triangle
a. MC based on Triangle distribution
b. Produces MC plots: Field1_Uniform.jpg
c. Number of plots is equal to number of fields analysed
d. Produces summary of result: Triangle_MC.csv
3. Monte_Carlo_Uniform
a. MC based on Uniform distribution
b. Produces MC plots: Field1_Uniform.jpg
c. Number of plots is equal to number of fields analysed
d. Produces summary of result: Uniform_MC.csv
4. Leverage
a. Produces leverage estimates for each field: Leverage_Field1
b. Number of .csv files is equal to number of fields analysed
To Work in R
1. Save this folder with programs and data to any convenient location on your
computer.
2. Download R if you do not already have it. http://www.r-project.org/
3. Open R
4. Inside R window go to File Change dirBrowse to this folder
5. To Run Rapfish
a. go to File Source R code
b. choose rapfish_execution.r and observe the results
c. choose monte_carlo_triangle.r and observe the results
d. choose monte_carlo_uniform.r and observe the results
e. choose leverage.r and observe the results
Data
1. Anchor files are provided in the folder and user does not need to provide
these
2. Files CCRF_Field1.csv . CCRF_Field6.csv are the 6 data files on which the
program is working. Please format your data accordingly:
a. Column header should not have spaces
b. It is better if the names of fisheries also do not have spaces
c. The file has 3 sections: main scores, lower bound of scores, and higher
bound of scores.
d. Please arrange in the same order as in the example
Habitat Reference_poin
ts
Fishery1
Fishery2
Low_Fishery1
Low_Fishery2
High_Fishery1
High_Fishery2
Error Message:
If you see the following error message: Error in rtri(nsim, lb[j, k], ub[j, k],
fisheries.dat[j, k]) : ml outside of range [min max]
It means that the score is not within the range of lower and upper bound specified
in the file. Please recheck your data. Type j: if the answer is 10 it means the 10 th
fishery in your dataset. Type k: if the answer is 2 it means the 2 nd attribute. So the
error is due the 2nd attribute for the 10th fishery.