mastering-shiny icon indicating copy to clipboard operation
mastering-shiny copied to clipboard

Chapter 4 - Wrong URL to download data

Open emsing opened this issue 2 years ago • 4 comments

In the online version of the book, I was unable to download the NEISS data using the code from the book. The URL: https://github.com/hadley/mastering-shiny/raw/master/neiss/

gave a 404 message.

I found this URL to work https://github.com/hadley/mastering-shiny/raw/main/neiss/

emsing avatar Jun 12 '23 19:06 emsing

Awesome, thanks - this was driving me mad

robertberryuk avatar Oct 05 '23 09:10 robertberryuk

What's weird, is that the source of the page shows the correct URL (using the main branch), but the rendered shows the incorrect.

I think the book just (I know that's not necessarily that simple) needs to be re-rendered and pushed up.

rmflight avatar Dec 03 '23 02:12 rmflight

Thanks emsing. That URL was helpful.

RyanGerardHoward avatar Dec 04 '23 16:12 RyanGerardHoward

In my case (as stated in issue #609), I had to use

https://raw.githubusercontent.com/hadley/mastering-shiny/main/neiss/

So, the function then looks like this

download <- function(name) {
  # url <- "https://github.com/hadley/mastering-shiny/raw/master/neiss/"
  url <- "https://raw.githubusercontent.com/hadley/mastering-shiny/main/neiss/"
  download.file(paste0(url, name), paste0("neiss/", name), quiet = TRUE)
}

I commented out the url stated in the online version of the book for emphasis.

ayoraind avatar Dec 27 '23 13:12 ayoraind