我有一个安全的网址,以Excel格式提供数据。我如何在R studio中阅读它?
请提及必要的程序包和功能。我尝试过read.xls()
,read_xlsx
,read.URL
等。似乎没有任何效果。
您可以分两步完成。首先,您需要使用download.file
之类的文件进行下载,然后使用readxl::read_excel
download.file("https://file-examples.com/wp-content/uploads/2017/02/file_example_XLS_10.xls", destfile = "/tmp/file.xls")
readxl::read_excel("/tmp/file.xls")
library(readxl)
library(httr)
url<-'https://......xls'
GET(url, write_disk(TF <- tempfile(fileext = ".xls")))
read_excel(TF)
您是否尝试过将其作为.csv数据集导入RStudio?可能值得一试!:)