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

Just working on terrain still! #5

Open
jenessalemon opened this issue Nov 15, 2016 · 4 comments
Open

Just working on terrain still! #5

jenessalemon opened this issue Nov 15, 2016 · 4 comments

Comments

@jenessalemon
Copy link
Collaborator

@willpearse Can you take a look at my code for terrain.R on lines 114 and below? Paul had a great idea to try to predetermine how many times the width of the matrix is going to have to be cut in half. My sad attempt to do so starts on line 128. Once I can get this vector of half values determined, can I use it to calculate "top" and "mid" (defined just under the for loop on lines 115 and 116) and go through the matrix that way?
When we talked yesterday it felt like I was so close...I was not very close...

@willpearse
Copy link
Member

You were very close. Paul's method is totally fine to do it, but it's not the way I was guiding you. I sense you've asked him for something because you got confused over what you already had.

seq is giving you those mid-points. Look at the output you've written in on line 101. Remember what we discussed during the session: you want to loop over something to get the different midpoints, and then loop again across columns and then loop across rows to calculate all the subsets.

@jenessalemon
Copy link
Collaborator Author

@willpearse I tried writing the first loop on line 79. At the beginning you told us we could call on you to write us a little piece of code, if I can use it now I would like to!

@jenessalemon
Copy link
Collaborator Author

Just discovered for (i in 2^(n:1)) ... give me a chance!

@willpearse
Copy link
Member

I'm not sure what you mean by this...

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