Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My plan for my 10 minutes 11/16 (And Thursday office hours) #6

Open
jenessalemon opened this issue Nov 16, 2016 · 1 comment
Open

Comments

@jenessalemon
Copy link
Collaborator

I have having a hard time keeping all of the variables straight,
as there are many. On my survive function(plants.R line 69), I say that if the cell
has NA, return NA, because we don't want to change anything. I then
say that if there is already a plant there, they are going to
compete! Lastly, if the cell is empty...and if the survival value is
lower than a random draw from a uniform distribution, we still do
nothing. Else, we...and that's I am stuck in the coding. I know that I need
to assign the cell to the name of the plant that now occupies it.
What I need to know:
1- is cell a cell in the char.matrix? How will R know that we
want a single cell from our char.matrix which is (plants)? Wouldn't we have
to call the whole char.matrix and then just index it? I guess I don't understand
how we are calling "cell" as an argument.
2- how can I assign the plant name to the matrix? I am assuming
that I need to use info$names at some point, but which of the two names do we
use? I'm thinking it must be something like:
cell <- info$names(?)

Separate plant.timestep question: are we going to keep time by just doing for(i in 1:100)? That is what I got from "discrete time steps." Is there a certain amount of time we need to keep?

@willpearse
Copy link
Member

  1. Answering your questions in order: Yes. Because you will give it a single cell from your matrix. Yes. --> I think, given that you've answered every question in your question, you do therefore understand what is going on...
  2. I don't really understand this question, so let's talk about it in class...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants