【发布时间】:2019-06-24 07:14:43
【问题描述】:
我想使用 googledrive 包将 google docs 电子表格转换为数据框(googlesheets 不再维护,googledrive 包似乎具有更广泛的功能)。
我阅读了 googledrive 包的文档,其中显示了如何获取工作表的名称,但没有说明如何将工作表本身放入数据框中:https://googledrive.tidyverse.org/
library(googlesheets) #no longer maintained
sheet1 <- gs_title("Sheet")
tab1 <- as.data.frame(sheet1(for_gs, ws = "mytab", skip=1)) #I want this tab
#How to do the same thing in googledrive?
library(googledrive)
drive_find(type = "spreadsheet")
#Get name
x<-drive_get(id = "id_of_sheet") #this provides the id of the sheet1
#How to I get mytab from sheet1 and convert it into a dataframe?
我希望能够获取 sheet1 并将其转换为数据框(如 googlesheets 示例中所示),但 googledrive 文档中没有任何内容说明如何执行此操作。
【问题讨论】: