You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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...
I don't really understand this question, so let's talk about it in class...
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?
The text was updated successfully, but these errors were encountered: