我经常从维基百科中提取表格.Excel的Web导入对维基百科无效,因为它将整个页面视为表格.在谷歌电子表格中,我可以输入:
=ImportHtml("http://en.wikipedia.org/wiki/Upper_Peninsula_of_Michigan","table",3)
此功能将从该页面下载第3张表,其中列出了密歇根州UP的所有县.
R中有类似的东西吗?或者可以通过用户定义的函数创建?
r dataframe
dataframe ×1
r ×1