googlesheets: Manage Google Spreadsheets from R

RからGoogle Spreadsheetsを管理する

> library(googlesheets)

バージョン: 0.1.0


関数名 概略
cell-specification Specify cells for reading or writing
example-sheets Examples of Google Sheets
extract_key_from_url Extract sheet key from a URL
googlesheet Register a Google Sheet
googlesheets 'googlesheets' package
gs_add_row Append a row to a spreadsheet
gs_auth Authorize 'googlesheets'
gs_copy Copy an existing spreadsheet
gs_delete Delete a spreadsheet
gs_download Download a spreadsheet
gs_edit_cells Edit cells
gs_grepdel Delete several spreadsheets at once by title
gs_inspect Visual overview of populated cells
gs_ls List sheets a la Google Sheets home screen
gs_new Create a new spreadsheet
gs_read Read data
gs_read_cellfeed Read data from cells
gs_read_csv Read data via the 'exportcsv' link
gs_read_listfeed Read data via the "list feed"
gs_reshape_cellfeed Reshape data from the "cell feed"
gs_simplify_cellfeed Simplify data from the cell feed
gs_upload Upload a file and convert it to a Google Sheet
gs_user Retrieve information about authorized user
gs_webapp_auth_url Build URL for authentication
gs_webapp_get_token Exchange authorization code for an access token
gs_ws_delete Delete a worksheet from a spreadsheet
gs_ws_ls List the worksheets in a spreadsheet
gs_ws_new Add a new worksheet within a spreadsheet
gs_ws_rename Rename a worksheet within a spreadsheet print.googlesheet Print info about a 'googlesheet' object

gs_auth

googlesheetsに対する認証を実施

> gs_auth()

gs_copy

既存のシートファイルを複製する

> gs_copy()

gs_delete

> gs_delete

gs_download

Arguments

  • from
  • ws
  • to
  • overwrite
  • verbose
> gs_download()

gs_ls

アカウントが所有するシートファイルの一覧を表示する

> gs_ls()
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
Source: local data frame [44 x 10]

                         sheet_title        author  perm version
                               (chr)         (chr) (chr)   (chr)
1                           timecard ichikawadais…     r     new
2           Eco/Evo Faculty Jobs 20… christopher.…    rw     new
3                    cran_pkg_dl_log     suika1127    rw     new
4                           my_sheet     suika1127    rw     new
5  Japan.R 2015 LT発表者募集(回答)        gepuro    rw     new
6      保育園URL検索結果&正解シート      mayumitt    rw     new
7               Tokyo.R #51 受付名簿    akiaki5516    rw     new
8               Tokyo.R #50 受付名簿    akiaki5516    rw     new
9                     無駄遣い家計簿     suika1127    rw     new
10                 test-gs-gapminder  rpackagetest     r     new
..                               ...           ...   ...     ...
Variables not shown: updated (time), sheet_key (chr), ws_feed (chr),
  alternate (chr), self (chr), alt_key (chr)

gs_new

新たなシートファイルを作成する

Arguments

  • title
  • ws_title
  • row_extent
  • col_extent
  • ...
  • verbose
> gs_new()

gs_title

> gs_title("dms_test")
Error in gs_lookup(., "sheet_title", verbose): "dms_test" doesn't match sheet_title of any sheet returned by gs_ls() (which should reflect user's Google Sheets home screen).

gs_upload

コンピュータにあるファイルをGoogle spreadsheetにアップロードする。対応形式は.xls, .xlsx, .csv, .tsv, .txt, .tab, .xlsm, .xlt, .xltx, xltm, .ods。

> gs_upload()

gs_user

ユーザーの情報を表示する

> gs_user()

gs_ws_rename

Arguments

  • ss
  • form
  • to
  • verbose
> gs_ws_rename()