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

Issue in blurpart.R in ch3 #1

Open
selvakumarjawahar opened this issue Jul 5, 2018 · 1 comment
Open

Issue in blurpart.R in ch3 #1

selvakumarjawahar opened this issue Jul 5, 2018 · 1 comment

Comments

@selvakumarjawahar
Copy link

There is a issue in blurpart.R file, where matrix indexing is wrong and a variable name is wrong. Here is the correct code
blurpart <- function(img,rows,cols,q){
lrows <- length(rows)
ncols <- length(cols)
newimg <- img
randomnoise <- matrix(nrow=lrows, ncol=ncols,runif(lrows*lcols))
newimg@grey[rows,cols] <- (1-q) * img@grey[rows,cols] + q * randomnoise
return(newimg)
}
If you allow me to raise a PR, I can do that.
btw thanks for this book, I am really enjoying learning R from this book.

@ricky-lim
Copy link

Great that you enjoy the book and yes sure

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