From 2502dfca6ee853724c43b41682bba06bd786b50d Mon Sep 17 00:00:00 2001 From: jennybc Date: Wed, 11 Dec 2024 11:19:59 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20tidyvers?= =?UTF-8?q?e/googlesheets4@3d5ec2864afca961591bff19141db7e8d804c107=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fun-with-googledrive-and-readxl.html | 18 +++--- dev/articles/googlesheets4.html | 15 +++-- dev/articles/read-sheets.html | 4 +- dev/articles/write-sheets.html | 60 +++++++++---------- dev/pkgdown.yml | 2 +- .../googlesheets4-configuration.html | 5 +- dev/reference/gs4_create.html | 12 ++-- dev/reference/gs4_formula.html | 4 +- dev/reference/gs4_random.html | 2 +- dev/reference/range_autofit.html | 4 +- dev/reference/range_delete.html | 2 +- dev/reference/range_flood.html | 2 +- dev/reference/range_speedread.html | 12 ++-- dev/reference/range_write.html | 4 +- dev/reference/sheet_add.html | 14 ++--- dev/reference/sheet_append.html | 2 +- dev/reference/sheet_copy.html | 4 +- dev/reference/sheet_delete.html | 22 +++---- dev/reference/sheet_relocate.html | 4 +- dev/reference/sheet_rename.html | 2 +- dev/reference/sheet_resize.html | 4 +- dev/reference/sheet_write.html | 10 ++-- dev/search.json | 2 +- 23 files changed, 104 insertions(+), 106 deletions(-) diff --git a/dev/articles/fun-with-googledrive-and-readxl.html b/dev/articles/fun-with-googledrive-and-readxl.html index 9fa50edd7..75f12de6d 100644 --- a/dev/articles/fun-with-googledrive-and-readxl.html +++ b/dev/articles/fun-with-googledrive-and-readxl.html @@ -130,29 +130,29 @@

Create a private She

Put the iris data into a csv file.

 (iris_tempfile <- tempfile(pattern = "iris-", fileext = ".csv"))
-#> [1] "/tmp/RtmpPWxE5y/iris-21a310e7cf1e.csv"
+#> [1] "/tmp/Rtmpn51DWu/iris-21be55786327.csv"
 write.csv(iris, iris_tempfile, row.names = FALSE)

Use googledrive::drive_upload() to upload the csv and simultaneously convert to a Sheet.

 (iris_ss <- drive_upload(iris_tempfile, type = "spreadsheet"))
 #> Local file:
-#> • /tmp/RtmpPWxE5y/iris-21a310e7cf1e.csv
+#> • /tmp/Rtmpn51DWu/iris-21be55786327.csv
 #> Uploaded into Drive file:
-#> • iris-21a310e7cf1e <id: 1LGzhKCKh4vnXKqC9ElGEn-lCMayTRZTtuJaHF3lelWA>
+#> • iris-21be55786327 <id: 1cl1HWO-Oye0fEP638E2mh_XV7L0jDNWCZeiTLHiv8x8>
 #> With MIME type:
 #> • application/vnd.google-apps.spreadsheet
 #> # A dribble: 1 × 3
 #>   name              id       drive_resource   
 #>   <chr>             <drv_id> <list>           
-#> 1 iris-21a310e7cf1e 1LGzhKC… <named list [35]>
+#> 1 iris-21be55786327 1cl1HWO… <named list [35]>
 
 # visit the new Sheet in the browser, in an interactive session!
 drive_browse(iris_ss)

Read data from the private Sheet into R.

 read_sheet(iris_ss, range = "B1:D6")
-#>  Reading from iris-21a310e7cf1e.
+#>  Reading from iris-21be55786327.csv.
 #>  Range B1:D6.
 #> # A tibble: 5 × 3
 #>   Sepal.Width Petal.Length Petal.Width
@@ -169,12 +169,12 @@ 

Create a local xlsx

Download the Sheet as an Excel workbook.

 (iris_xlsxfile <- sub("[.]csv", ".xlsx", iris_tempfile))
-#> [1] "/tmp/RtmpPWxE5y/iris-21a310e7cf1e.xlsx"
+#> [1] "/tmp/Rtmpn51DWu/iris-21be55786327.xlsx"
 drive_download(iris_ss, path = iris_xlsxfile, overwrite = TRUE)
 #> File downloaded:
-#> • iris-21a310e7cf1e <id: 1LGzhKCKh4vnXKqC9ElGEn-lCMayTRZTtuJaHF3lelWA>
+#> • iris-21be55786327 <id: 1cl1HWO-Oye0fEP638E2mh_XV7L0jDNWCZeiTLHiv8x8>
 #> Saved locally as:
-#> • /tmp/RtmpPWxE5y/iris-21a310e7cf1e.xlsx
+#> • /tmp/Rtmpn51DWu/iris-21be55786327.xlsx

Read xlsx with readxl @@ -207,7 +207,7 @@

Clean up#> [1] TRUE TRUE drive_trash(iris_ss) #> File trashed: -#> • iris-21a310e7cf1e <id: 1LGzhKCKh4vnXKqC9ElGEn-lCMayTRZTtuJaHF3lelWA>

+#> • iris-21be55786327 <id: 1cl1HWO-Oye0fEP638E2mh_XV7L0jDNWCZeiTLHiv8x8> diff --git a/dev/articles/googlesheets4.html b/dev/articles/googlesheets4.html index 85fda2cd6..1580fea9d 100644 --- a/dev/articles/googlesheets4.html +++ b/dev/articles/googlesheets4.html @@ -270,12 +270,11 @@

Writing Sheets ss <- sheet_write(df) #> Creating new Sheet: unfearing-guineafowl. -#> Request failed [503]. Retry 1 happens in 1 seconds ... ss #> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: unfearing-guineafowl -#> ID: 1VAnEEU34JWEACCvD4H5Q3sv1OxyBG54qlrsMR60jzG0 +#> ID: 17AXRqpLr6Fr2rIEIlnDCVZcAaIETz0I6FO0n0HPZBho #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -291,7 +290,7 @@

Writing Sheets
 googledrive::drive_trash(ss)
 #> File trashed:
-#> • unfearing-guineafowl <id: 1VAnEEU34JWEACCvD4H5Q3sv1OxyBG54qlrsMR60jzG0>
+#> • unfearing-guineafowl <id: 17AXRqpLr6Fr2rIEIlnDCVZcAaIETz0I6FO0n0HPZBho>
 
 ss <- gs4_create("testy-hedgehog", sheets = df)
 #>  Creating new Sheet: testy-hedgehog.
@@ -299,7 +298,7 @@ 

Writing Sheets#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: testy-hedgehog -#> ID: 1j8G5grBGSEOOTv_Fvbwve30gHea767q0YEV5D_YcD9U +#> ID: 1J56_3HqTFOpMfUZSs-AjIAV_QIXP6g1tEr77W0Qnqbg #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -318,7 +317,7 @@

Writing Sheets#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: testy-hedgehog -#> ID: 1j8G5grBGSEOOTv_Fvbwve30gHea767q0YEV5D_YcD9U +#> ID: 1J56_3HqTFOpMfUZSs-AjIAV_QIXP6g1tEr77W0Qnqbg #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 2 @@ -379,12 +378,12 @@

Writing Sheets#> # A tibble: 2 × 8 #> name index id type visible grid_rows grid_columns data #> <chr> <int> <int> <chr> <lgl> <int> <int> <list> -#> 1 df 0 1950683364 GRID TRUE 9 2 <NULL> -#> 2 chickwts 1 705617063 GRID TRUE 72 2 <NULL> +#> 1 df 0 842264803 GRID TRUE 9 2 <NULL> +#> 2 chickwts 1 1418272902 GRID TRUE 72 2 <NULL> googledrive::drive_trash(ss) #> File trashed: -#> • testy-hedgehog <id: 1j8G5grBGSEOOTv_Fvbwve30gHea767q0YEV5D_YcD9U>

+#> • testy-hedgehog <id: 1J56_3HqTFOpMfUZSs-AjIAV_QIXP6g1tEr77W0Qnqbg>

The article Write Sheets has even more detail.

diff --git a/dev/articles/read-sheets.html b/dev/articles/read-sheets.html index 634e72d6e..6c529bd97 100644 --- a/dev/articles/read-sheets.html +++ b/dev/articles/read-sheets.html @@ -426,14 +426,14 @@

When speed matters#> Use `spec()` to retrieve the full column specification for this data. #> Specify the column types or set `show_col_types = FALSE` to quiet this message. #> user system elapsed -#> 0.068 0.024 0.478 +#> 0.092 0.003 0.660 system.time( gs4_example("gapminder") %>% range_read(sheet = "Africa") ) #> Reading from gapminder. #> Range ''Africa''. #> user system elapsed -#> 0.299 0.000 0.579 +#> 0.298 0.008 0.767

The modest difference above shows that the speed difference is unlikely to be a gamechanger in many settings.

Summary of how to think about range_speedread() vs diff --git a/dev/articles/write-sheets.html b/dev/articles/write-sheets.html index 73a28f9a1..1c182f7c5 100644 --- a/dev/articles/write-sheets.html +++ b/dev/articles/write-sheets.html @@ -175,7 +175,7 @@

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-create-demo-1 -#> ID: 1xeBeho-aZpf15SQzlFgoEDm3AcLSk3iddu8ZlwZsW4w +#> ID: 1VCgANmPaGvljaQ_WA-nkt_RZLGmme-6GeeDP3PvF5g0 #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -202,7 +202,7 @@

Send sheet names#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-create-demo-2 -#> ID: 1XgpzbZ3myarHXAFhzATs5Zp5sGek66byw3k6E8vRFz8 +#> ID: 1Xq0G6ADtgKv2ovlwC3zArLHVFRJP9r2IwL1MRghqob4 #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 2 @@ -233,7 +233,7 @@

Send a data frame#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-create-demo-3 -#> ID: 1S9Vfn1mVra2er8REqdRqmrF-dthCykPHkE8wNNJGeaE +#> ID: 1GbLgxterfcQs1vOmb_-27ntmSunpJkY6TNmJIMg29HA #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -261,7 +261,7 @@

Send multiple data frames#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-create-demo-4 -#> ID: 1J4CZ62PO_t02_CI1bxs7dp7dCw_Xd8dTGu5Op7Z8AFA +#> ID: 1-gLlyMZzDWs-Km9cyDlGX7Z9St5cI0WVGZMrM3JJjOA #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 2 @@ -291,7 +291,7 @@

Write metadata#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-create-demo-5 -#> ID: 1gI7H4eAanut7VBWC7i8PdaI6bHH1pUGkq4FE-KpvJqc +#> ID: 1_d2-x0HPMwjwy2ZSRt5EsU-_eM3gH232OxjosJiDMeg #> Locale: fr_FR #> Time zone: Europe/Paris #> # of sheets: 1 @@ -316,11 +316,11 @@

Clean upgs4_find("sheets-create-demo") %>% googledrive::drive_trash() #> Files trashed: -#> • sheets-create-demo-5 <id: 1gI7H4eAanut7VBWC7i8PdaI6bHH1pUGkq4FE-KpvJqc> -#> • sheets-create-demo-4 <id: 1J4CZ62PO_t02_CI1bxs7dp7dCw_Xd8dTGu5Op7Z8AFA> -#> • sheets-create-demo-3 <id: 1S9Vfn1mVra2er8REqdRqmrF-dthCykPHkE8wNNJGeaE> -#> • sheets-create-demo-2 <id: 1XgpzbZ3myarHXAFhzATs5Zp5sGek66byw3k6E8vRFz8> -#> • sheets-create-demo-1 <id: 1xeBeho-aZpf15SQzlFgoEDm3AcLSk3iddu8ZlwZsW4w> +#> • sheets-create-demo-5 <id: 1_d2-x0HPMwjwy2ZSRt5EsU-_eM3gH232OxjosJiDMeg> +#> • sheets-create-demo-4 <id: 1-gLlyMZzDWs-Km9cyDlGX7Z9St5cI0WVGZMrM3JJjOA> +#> • sheets-create-demo-3 <id: 1GbLgxterfcQs1vOmb_-27ntmSunpJkY6TNmJIMg29HA> +#> • sheets-create-demo-2 <id: 1Xq0G6ADtgKv2ovlwC3zArLHVFRJP9r2IwL1MRghqob4> +#> • sheets-create-demo-1 <id: 1VCgANmPaGvljaQ_WA-nkt_RZLGmme-6GeeDP3PvF5g0>
@@ -343,7 +343,7 @@

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: unfearing-guineafowl -#> ID: 1jMTTcgmkrHgwhinbTQgSr8SO02hTKTsK3dnj-12PR6s +#> ID: 1cazoMXob8kodUV8soe9dJrQD2neK1uTEhggodYx-lb0 #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -363,7 +363,7 @@

 googledrive::drive_trash(random_ss)
 #> File trashed:
-#> • unfearing-guineafowl <id: 1jMTTcgmkrHgwhinbTQgSr8SO02hTKTsK3dnj-12PR6s>
+#> • unfearing-guineafowl <id: 1cazoMXob8kodUV8soe9dJrQD2neK1uTEhggodYx-lb0>
 
 ss1 <- gs4_create(
   "write-sheets-demo-1",
@@ -374,7 +374,7 @@ 

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: write-sheets-demo-1 -#> ID: 1i8yhrjyY4dCtJ7TNUxyqSVz_SC7AGNocj7tGD8eqOVo +#> ID: 1RfTgDmmC8LHZGZ0C97LsBEmLdHa_lfB0Tty2w_iewqY #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -392,7 +392,7 @@

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: write-sheets-demo-1 -#> ID: 1i8yhrjyY4dCtJ7TNUxyqSVz_SC7AGNocj7tGD8eqOVo +#> ID: 1RfTgDmmC8LHZGZ0C97LsBEmLdHa_lfB0Tty2w_iewqY #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -424,7 +424,7 @@

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: write-sheets-demo-1 -#> ID: 1i8yhrjyY4dCtJ7TNUxyqSVz_SC7AGNocj7tGD8eqOVo +#> ID: 1RfTgDmmC8LHZGZ0C97LsBEmLdHa_lfB0Tty2w_iewqY #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 4 @@ -442,7 +442,7 @@

Clean upgs4_find("write-sheets-demo") %>% googledrive::drive_trash() #> File trashed: -#> • write-sheets-demo-1 <id: 1i8yhrjyY4dCtJ7TNUxyqSVz_SC7AGNocj7tGD8eqOVo>

+#> • write-sheets-demo-1 <id: 1RfTgDmmC8LHZGZ0C97LsBEmLdHa_lfB0Tty2w_iewqY>

@@ -484,12 +484,11 @@

 ss <- gs4_create("sheets-append-demo", sheets = list(deaths = deaths_zero))
 #>  Creating new Sheet: sheets-append-demo.
-#>  Request failed [503]. Retry 1 happens in 1 seconds ...
 ss
 #> 
 #> ── <googlesheets4_spreadsheet> ───────────────────────────────────────────
 #> Spreadsheet name: sheets-append-demo                          
-#>               ID: 1bA26gDVBS-VR3J9Dc2lX7J4kLlo7kZQXKTq9oR7HgYw
+#>               ID: 1S1r0fDt_09oRjOn75QpEnVrsFRuq1sgPJtLgfGGXO-g
 #>           Locale: en_US                                       
 #>        Time zone: Etc/GMT                                     
 #>      # of sheets: 1                                           
@@ -510,7 +509,7 @@ 

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-append-demo -#> ID: 1bA26gDVBS-VR3J9Dc2lX7J4kLlo7kZQXKTq9oR7HgYw +#> ID: 1S1r0fDt_09oRjOn75QpEnVrsFRuq1sgPJtLgfGGXO-g #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -527,7 +526,7 @@

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-append-demo -#> ID: 1bA26gDVBS-VR3J9Dc2lX7J4kLlo7kZQXKTq9oR7HgYw +#> ID: 1S1r0fDt_09oRjOn75QpEnVrsFRuq1sgPJtLgfGGXO-g #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -544,7 +543,7 @@

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-append-demo -#> ID: 1bA26gDVBS-VR3J9Dc2lX7J4kLlo7kZQXKTq9oR7HgYw +#> ID: 1S1r0fDt_09oRjOn75QpEnVrsFRuq1sgPJtLgfGGXO-g #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -561,7 +560,7 @@

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-append-demo -#> ID: 1bA26gDVBS-VR3J9Dc2lX7J4kLlo7kZQXKTq9oR7HgYw +#> ID: 1S1r0fDt_09oRjOn75QpEnVrsFRuq1sgPJtLgfGGXO-g #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -586,7 +585,7 @@

Clean upgs4_find("sheets-append-demo") %>% googledrive::drive_trash() #> File trashed: -#> • sheets-append-demo <id: 1bA26gDVBS-VR3J9Dc2lX7J4kLlo7kZQXKTq9oR7HgYw>

+#> • sheets-append-demo <id: 1S1r0fDt_09oRjOn75QpEnVrsFRuq1sgPJtLgfGGXO-g>

@@ -768,7 +767,7 @@

Clean upgs4_find("sheets-edit-demo") %>% googledrive::drive_trash() #> File trashed: -#> • sheets-edit-demo <id: 1WeYxJACBCgn3aJAYmRiRAeBKCcvU7R4Lvaak3jbctew>

+#> • sheets-edit-demo <id: 1DgbGNJh8F_8yBZgRWG_79as6Uzxsv2sRIPkGmI242rk>
@@ -794,10 +793,11 @@

Write formulas (ss <- gs4_create("sheets-formula-demo", sheets = lang_dat)) #> Creating new Sheet: sheets-formula-demo. +#> Request failed [500]. Retry 1 happens in 1 seconds ... #> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-formula-demo -#> ID: 1ag-xWv5g5J_6Z3yqvYvUJphCavvomZ8BSrg4-OcEZX0 +#> ID: 1ZpSd69ba1VUQ3mPFG-s2eNF9yU8vVcCcXriffCHQQoE #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -823,7 +823,7 @@

Clean upgs4_find("sheets-formula-demo") %>% googledrive::drive_trash() #> File trashed: -#> • sheets-formula-demo <id: 1ag-xWv5g5J_6Z3yqvYvUJphCavvomZ8BSrg4-OcEZX0>

+#> • sheets-formula-demo <id: 1ZpSd69ba1VUQ3mPFG-s2eNF9yU8vVcCcXriffCHQQoE>
@@ -844,7 +844,7 @@

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: range-flood-demo -#> ID: 1-whmRdnn1mAj5bd93gM1eguSENOLRha3sqfIs_DyCoM +#> ID: 11uUkd9odo5Pd__mipDqKI7TqceppFNARUBLNmDo_Scs #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -932,7 +932,7 @@

Clean upgs4_find("range-flood-demo") %>% googledrive::drive_trash() #> File trashed: -#> • range-flood-demo <id: 1-whmRdnn1mAj5bd93gM1eguSENOLRha3sqfIs_DyCoM>

+#> • range-flood-demo <id: 11uUkd9odo5Pd__mipDqKI7TqceppFNARUBLNmDo_Scs>
@@ -954,7 +954,7 @@

#> #> ── <googlesheets4_spreadsheet> ─────────────────────────────────────────── #> Spreadsheet name: sheets-delete-demo -#> ID: 1IUfBODcQIUX5rxwk7Aw2CrisLPe2sqK-ylzOTAGEcIc +#> ID: 1XUqpfo6u2DKVS6PB7-OsgRLhENvrstyre_90n2_1x1k #> Locale: en_US #> Time zone: Etc/GMT #> # of sheets: 1 @@ -1027,7 +1027,7 @@

Clean upgs4_find("sheets-delete-demo") %>% googledrive::drive_trash() #> File trashed: -#> • sheets-delete-demo <id: 1IUfBODcQIUX5rxwk7Aw2CrisLPe2sqK-ylzOTAGEcIc>

+#> • sheets-delete-demo <id: 1XUqpfo6u2DKVS6PB7-OsgRLhENvrstyre_90n2_1x1k>