将Google表格数据直接导入R [英] Import Google sheet data directly into R

查看:104
本文介绍了将Google表格数据直接导入R的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在没有授权密钥的情况下直接将表格从Google文档导入R?我有一个可共享的Google表格,我尝试连接到闪亮的应用程序,但找不到正确的方法.

Is it possible to import a table into R directly from Google docs without authorization key? I have a sharable google sheet that I try to connect to shiny app but couldn't find a proper way.

推荐答案

使用包gsheet,您可以从共享链接中读取工作表. 文档中给出的示例:

With the package gsheet you can read in a sheet from the shareable link. Example given in the docs:

library(gsheet)
url <- 'docs.google.com/spreadsheets/d/1I9mJsS5QnXF2TNNntTy-HrcdHmIF9wJ8ONYvEJTXSNo'
a <- gsheet2tbl(url)

很好.

这篇关于将Google表格数据直接导入R的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆