如何从 R 中共享 link (url) 的 Box 中读取 table?

How to read a table from a Box shared link (url) in R?

我需要读取通过 Box.com 共享的文本文件 - 我将以 mtcars.txt 为例。

 WES.ped.exp <-
 read.table("https://ucsf.box.com/s/tht30egddqjqlq3koucqy7rhtzkh3ydi")

问题是共享 link 将我带到查看器界面,应该从那里单击 Download,而不是 直接 到普通界面.txt 文件。

读取table时,它只读取HTML行,像这样:

我试过 curlscanread.table,有什么想法吗?

转到相关文件的共享设置。单击 "Share",进入设置,确保文件的共享 link 设置为 "Anyone with the link can view and download this file",以便生成直接 link。

转到小设置图标,复制 "Direct Link",然后将其粘贴到以下内容中:

read.table("https://ucsf.box.com/shared/static/whateverthelinksays.txt")