Question

In: Computer Science

Please provide an example of how MC.sim in R is to be used. The data can...

Please provide an example of how MC.sim in R is to be used. The data can be made up, but please provide steps and explanations what to plug into that function. Thanks.

Solutions

Expert Solution

Metacommunity Simulation package (MC.sim) , written in ANSI -Standard C language.

--> In order to install the current version of MCsim, u need to have devtools installed.

Once devtools is installed. u can install the current version of MCsim.

there are two steps to create metacommunity simulation in MC.sim:,

1. Make a "Landscape" :

The landscape in the "game board" on which the simulation play out and is created using the function. a landscape can be made from   , for example:

xy.coordinates.<- data.frame (

x = c (1, 2,3,4,5,),

y -= c(1 ,3, 1,5,2 ))

print(xy.coordinates)

in addition for plotting use function: plot (y ~ x , xy.coordinates)

Vectors can also be passed to fm.make.landscape, for example:

my.landscape <- MCSim: :fn.make.landscape(

site.coords=xy.coordinates,

m= c(0.5,0.5,0.1,0.1,0.1),

Ef = c(-1, -.25, .1, 1 ,2) ,

JM=1000000)

print(my.landscape$site.info).

2. Run the Simulation:

once the landscape is created , you can pass the landscape object to fn.metaSIM, along with parameter settings.

To run the simulation we have to define:

1.) the players and the traits,

2) How the players move along sites,

3) what is the probability of new players appering?

4) How long is the game ,

5) saving the output,

print(sim.result$sim.result.name).


Related Solutions

How can phylogenies be used to test a hypothesis? provide an example.
How can phylogenies be used to test a hypothesis? provide an example.
please provide example(s) how you have used excel to analyze data and share your results?? this...
please provide example(s) how you have used excel to analyze data and share your results?? this is more like a inteview question but i want to nniw its sample answer
Provide an example in which real-time data can be used as a competitive advantage for corporations....
Provide an example in which real-time data can be used as a competitive advantage for corporations. Why do you feel this real-time data is an advantage? How long can the advantage last?
Please provide an example and then discuss how regression analysis may be used as a forecasting...
Please provide an example and then discuss how regression analysis may be used as a forecasting tool. Thank you.
Provide an example on how data mining can turn a large collection of data into knowledge...
Provide an example on how data mining can turn a large collection of data into knowledge that can help meet a current global challenge in order to improve healthcare outcomes.
Provide an real life example of a confidence interval and how it can be used, listing...
Provide an real life example of a confidence interval and how it can be used, listing also advantages and disadvantages associated with it. (In 300 words or more)
Explain how forwards or futures can be used to manage risk. Provide an example of a...
Explain how forwards or futures can be used to manage risk. Provide an example of a hedge that uses a short futures position.   Why might you chose to use a put option as a hedge instead of a short futures position?
Can you provide an example on how a decision tree might be used in practice?
Can you provide an example on how a decision tree might be used in practice?
1. Provide an example of how feedback from customers can be used as part of a...
1. Provide an example of how feedback from customers can be used as part of a control system. 2. How does EVA give a company a more accurate picture of its profitability than does profit margin?
How can data provide information to evaluate quality patient outcomes? Give an example of data that...
How can data provide information to evaluate quality patient outcomes? Give an example of data that can reflect poor quality in care. How can quality improvement be a daily task in patient care? Why does continuous quality improvement need to be associated with change? Please provide a reference. Thanks in advance.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT