I choose one mirror that is close to me, but it still didn't work. I use my own PC at home. So I think the internet connection should be OK? But I am not sure if it is due to some restrictions on the internet in mainland China.
I run the install code again after chaging the mirror. It pops up as below.
> install.packages("swirl")
Warning in install.packages :
lzma decoding result 10
Installing package into ‘C:/Users/xiaqu/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘swirl’ is not available (for R version 3.6.3)
Warning in install.packages :
lzma decoding result 10