Ping a website in R

前端 未结 4 1375
难免孤独
难免孤独 2020-12-03 17:39

I would like to create a script in R that pings a given website. I haven\'t found any information about this specific for R.

To start with, all I need is the informa

4条回答
  •  抹茶落季
    2020-12-03 18:10

    To get the status code

    library(httr)
    
    b <- GET("http://www.google.com")
    
    b$status_code
    
    [1] 200 
    

提交回复
热议问题