reprex()函数出错:无法连接到api.imgur.com端口443:超时

reprex()函数出错:无法连接到api.imgur.com端口443:超时,r,ggplot2,tidyverse,reprex,R,Ggplot2,Tidyverse,Reprex,标题也一样 我想用reprex包中的reprex()函数显示一些有关StackOverflow的代码和结果 代码如下: library(tidyverse) set.seed(20201011) metal <- c("Al", "As", "Cd", "Co") site <- paste('City', LETTERS[1:5], sep = '_') season <- c('spring'

标题也一样

我想用
reprex
包中的
reprex()
函数显示一些有关StackOverflow的代码和结果

代码如下:

library(tidyverse)
set.seed(20201011)

metal <- c("Al", "As", "Cd", "Co")
site <- paste('City', LETTERS[1:5], sep = '_')
season <- c('spring', 'summer', 'autumn', 'winter')

frames <- expand.grid(metal = metal,
                       site = site,
                       season = season)
dat.avg <- frames %>% cbind(Average = rnorm(nrow(frames)),
                            STDV = rnorm(nrow(frames)))

dat.avg.0 <- dat.avg %>% filter(metal == 'Al')

# ERROR BAR PLOT
ggplot(dat.avg.0, aes(x = season, group = site, color = site))+
  geom_errorbar(
    aes(ymin=Average-STDV,
        ymax=Average+STDV),
    position = position_dodge(.4), width = .3) +
  geom_point(aes(y = Average),  position = position_dodge(.4))

ggplot(dat.avg, aes(x = season, group = site, color = site))+
  geom_errorbar(
    aes(ymin=Average-STDV,
        ymax=Average+STDV),
    position = position_dodge(.4), width = .3) +
  geom_point(aes(y = Average),  position = position_dodge(.4)) +
  facet_grid(metal ~.) +
  labs(
    title = 'Variation in Metals Conentration along Israeli Mediterranean Coastline, by Season and Site',
    subtitle  = 'North to South',
    caption = 'Field Smapling 2019-2020, \n *Outliers omited for better visualization'
  ) +
  theme(
    plot.title = element_text(color = 'Darkblue'),
    plot.subtitle = element_text(color = 'blue'),
    plot.caption = element_text(color = 'green', face = 'bold')
    
  ) + 
  guides(color = F)


# BOXPLOT
metal <- c("Al", "As", "Cd", "Co")
site <- paste('City', LETTERS[1:5], sep = '_')
season <- c('spring', 'summer', 'autumn', 'winter')
day <- 1:10

frames <- expand.grid(metal = metal,
                      site = site,
                      season = season,
                      day = day)

dat.avg <- frames %>% cbind(Value = rnorm(nrow(frames)))


ggplot(dat.avg, aes(x = season, color = site))+
  geom_boxplot(aes(y = Value)) + 
  facet_grid(metal ~.) +
  labs(
    title = 'Variation in Metals Conentration along Israeli Mediterranean Coastline, by Season and Site',
    subtitle  = 'North to South',
    caption = 'Field Smapling 2019-2020, \n *Outliers omited for better visualization'
  ) +
  theme(
    plot.title = element_text(color = 'Darkblue'),
    plot.subtitle = element_text(color = 'blue'),
    plot.caption = element_text(color = 'green', face = 'bold')
    
  ) + 
  guides(color = F)

然后发生错误:

错误:callr子进程失败:无法连接到api.imgur.com端口443:超时

我不知道如何解决它

任何帮助都将不胜感激

我的sessionInfo如下所示:

R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 
[2] LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
 [1] reprex_0.3.0     ggnewscale_0.4.3 geosphere_1.5-10
 [4] scatterpie_0.1.5 lubridate_1.7.9  forcats_0.5.0   
 [7] stringr_1.4.0    dplyr_1.0.2      purrr_0.3.4     
[10] readr_1.3.1      tidyr_1.1.2      tibble_3.0.3    
[13] ggplot2_3.3.2    tidyverse_1.3.0  readxl_1.3.1    
[16] feather_0.3.5   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5          lattice_0.20-38     ps_1.3.4           
 [4] assertthat_0.2.1    digest_0.6.25       ggforce_0.3.2      
 [7] R6_2.4.1            cellranger_1.1.0    backports_1.1.6    
[10] evaluate_0.14       httr_1.4.2          pillar_1.4.6       
[13] rlang_0.4.7         rstudioapi_0.11     callr_3.4.4        
[16] whisker_0.4         blob_1.2.1          rmarkdown_2.3      
[19] labeling_0.3        polyclip_1.10-0     munsell_0.5.0      
[22] broom_0.7.0         compiler_3.6.3      modelr_0.1.8       
[25] xfun_0.17           pkgconfig_2.0.3     clipr_0.7.0        
[28] htmltools_0.5.0     tidyselect_1.1.0    fansi_0.4.1        
[31] crayon_1.3.4        dbplyr_1.4.4        withr_2.3.0        
[34] MASS_7.3-51.5       grid_3.6.3          jsonlite_1.7.1     
[37] gtable_0.3.0        lifecycle_0.2.0     DBI_1.1.0          
[40] magrittr_1.5        scales_1.1.1        cli_2.0.2          
[43] stringi_1.4.6       farver_2.0.3        fs_1.4.0           
[46] sp_1.4-2            xml2_1.3.2          ellipsis_0.3.1     
[49] rvcheck_0.1.8       generics_0.0.2      vctrs_0.3.4        
[52] tools_3.6.3         glue_1.4.0          tweenr_1.0.1       
[55] maps_3.3.0          hms_0.5.3           processx_3.4.3     
[58] colorspace_1.4-1    BiocManager_1.30.10 rvest_0.3.6        
[61] knitr_1.30          haven_2.3.1   

错误是因为reprex包含打印命令。当包含绘图时,reprex调用
knitr::imgur_upload
,主要是将绘图上载到imgur站点。该错误可能是因为您的防病毒或防火墙设置可能阻止该功能将该图像上载到站点。尝试禁用防火墙。
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 
[2] LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
 [1] reprex_0.3.0     ggnewscale_0.4.3 geosphere_1.5-10
 [4] scatterpie_0.1.5 lubridate_1.7.9  forcats_0.5.0   
 [7] stringr_1.4.0    dplyr_1.0.2      purrr_0.3.4     
[10] readr_1.3.1      tidyr_1.1.2      tibble_3.0.3    
[13] ggplot2_3.3.2    tidyverse_1.3.0  readxl_1.3.1    
[16] feather_0.3.5   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5          lattice_0.20-38     ps_1.3.4           
 [4] assertthat_0.2.1    digest_0.6.25       ggforce_0.3.2      
 [7] R6_2.4.1            cellranger_1.1.0    backports_1.1.6    
[10] evaluate_0.14       httr_1.4.2          pillar_1.4.6       
[13] rlang_0.4.7         rstudioapi_0.11     callr_3.4.4        
[16] whisker_0.4         blob_1.2.1          rmarkdown_2.3      
[19] labeling_0.3        polyclip_1.10-0     munsell_0.5.0      
[22] broom_0.7.0         compiler_3.6.3      modelr_0.1.8       
[25] xfun_0.17           pkgconfig_2.0.3     clipr_0.7.0        
[28] htmltools_0.5.0     tidyselect_1.1.0    fansi_0.4.1        
[31] crayon_1.3.4        dbplyr_1.4.4        withr_2.3.0        
[34] MASS_7.3-51.5       grid_3.6.3          jsonlite_1.7.1     
[37] gtable_0.3.0        lifecycle_0.2.0     DBI_1.1.0          
[40] magrittr_1.5        scales_1.1.1        cli_2.0.2          
[43] stringi_1.4.6       farver_2.0.3        fs_1.4.0           
[46] sp_1.4-2            xml2_1.3.2          ellipsis_0.3.1     
[49] rvcheck_0.1.8       generics_0.0.2      vctrs_0.3.4        
[52] tools_3.6.3         glue_1.4.0          tweenr_1.0.1       
[55] maps_3.3.0          hms_0.5.3           processx_3.4.3     
[58] colorspace_1.4-1    BiocManager_1.30.10 rvest_0.3.6        
[61] knitr_1.30          haven_2.3.1