You are on page 1of 3

To Work from the site

It needs the following information:

1. The names of all the datafiles to be analysed (i.e. number of fields)


2. The names of the datafiles are automatically used for naming the output files and in the Radar
plots.
3. Number of fisheries being analysed. The names of the fisheries are automatically used in the
Rapfish plots.
4. For Monte Carlo, it needs an input of the number of simulations
5. Ken had created a function for normalizing scores called fisheries.norm – I have not used this
function now because all the scores are beween 0 and 10 and 0 is ‘Bad’ and 10 is ‘Good’.
6. I think, if possible, it would be great if we can have 4 buttons for each of the following on the
website
a. Rapfish execution and radar plots
b. Monte Carlo Triangle
c. Monte Carlo Uniform
d. Leverage

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 dirBrowse 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_points
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 10th fishery in your dataset. Type k: if the
answer is 2 – it means the 2nd attribute. So the error is due the 2nd attribute for the 10th fishery.

You might also like