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

Getting close on terrain! #8

Open
jenessalemon opened this issue Nov 17, 2016 · 2 comments
Open

Getting close on terrain! #8

jenessalemon opened this issue Nov 17, 2016 · 2 comments

Comments

@jenessalemon
Copy link
Collaborator

jenessalemon commented Nov 17, 2016

@willpearse
My diamond.square.step is so close. See lines 77-90 of terrain.R. The error I am getting says:
Error in mat[k:(k + i), j:(j + i)] : subscript out of bounds
But this notation is just telling R to step through the matrix one iteration at a time, am I stopping/starting at the wrong place or am I not as close as I think?
Would an error like this cause my package to fail during installation?

@willpearse
Copy link
Member

A subscript is another way of saying your subsetting. Your subsetting is "out of bounds", which Google dictionary defines as "outside the limits of where one is permitted to be.". What do you think is happening?

@jenessalemon
Copy link
Collaborator Author

@willpearse I must be trying to index outside the matrix. The sequences that I am generating on lines 84 and 85 are not the same length as the terrain matrix.

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