简体   繁体   中英

Error in file(file) : invalid 'description' argument when running R graph gallery example

In trying to replicate this recipe on: https://r-graph-gallery.com/web-circular-barplot-with-R-and-ggplot2.html

I'm not able to pull the data through: hike_data <-readr::read_rds(url('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-11-24/hike_data.rds'))

The following error is obtained: "Error in file(file): invalid 'description' argument"

Simply remove the url

readr::read_rds('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-11-24/hike_data.rds')
#> # A tibble: 1,958 x 8
#>    name              location length gain  highpoint rating features description
#>    <chr>             <chr>    <chr>  <chr> <chr>     <chr>  <list>   <chr>      
#>  1 Lake Hills Green~ Puget S~ 2.3 m~ 50    330.0     3.67   <chr>    "Hike thro~
#>  2 Snow Lake         Snoqual~ 7.2 m~ 1800  4400.0    4.16   <chr>    "A relativ~
#>  3 Skookum Flats     Mount R~ 7.8 m~ 300   2550.0    3.68   <chr>    "Choose be~
#>  4 Teneriffe Falls   Snoqual~ 5.6 m~ 1585  2370.0    3.92   <chr>    "You'll wo~
#>  5 Twin Falls        Snoqual~ 2.6 m~ 500   1000.0    4.14   <chr>    "Visit a t~
#>  6 Chenuis Falls     Mount R~ 8.0 m~ 500   2200.0    3.14   <chr>    "A long wa~
#>  7 Old Mine Trail    Mount R~ 3.4 m~ 425   2150.0    5.00   <chr>    "An infreq~
#>  8 Flaming Geyser S~ Puget S~ 4.0 m~ 450   425.0     2.68   <chr>    "The strik~
#>  9 Salmon Ridge Sno~ North C~ 5.4 m~ 300   2400.0    4.00   <chr>    "With gent~
#> 10 May Valley Loop   Issaqua~ 6.6 m~ 1684  2024.0    2.96   <chr>    "This fore~
#> # ... with 1,948 more rows

Created on 2022-05-07 by the reprex package (v2.0.1)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM