diff --git a/dev/articles/customize-pins-metadata.html b/dev/articles/customize-pins-metadata.html index 8cd65471..a84cb743 100644 --- a/dev/articles/customize-pins-metadata.html +++ b/dev/articles/customize-pins-metadata.html @@ -138,7 +138,7 @@

A function to store factors
 ten_letters <- factor(sample(letters, size = 10), levels = letters)
 board %>% pin_write_factor_json(ten_letters, "letters-as-json")
-#> Creating new version '20240802T165216Z-099e2'
+#> Creating new version '20240802T172604Z-099e2'
 #> Writing to pin 'letters-as-json'

A function to read factors diff --git a/dev/articles/managing-custom-formats.html b/dev/articles/managing-custom-formats.html index a057ff31..6340aca8 100644 --- a/dev/articles/managing-custom-formats.html +++ b/dev/articles/managing-custom-formats.html @@ -133,7 +133,7 @@

Upload a single filearrow::write_feather(mtcars, path, compression = "uncompressed") pin_upload(board, paths = path, name = pin_name) -#> Creating new version '20240802T165218Z-83900'

+#> Creating new version '20240802T172607Z-83900'

Reading from the downloaded pin is straightforward; pin_download() returns a local path that can be piped to arrow::read_feather():

@@ -173,7 +173,7 @@

Function to manage uploadingpin_write():

 pin_upload_arrow(board, x = mtcars, name = "mtcars-arrow2")
-#> Creating new version '20240802T165218Z-83900'
+#> Creating new version '20240802T172607Z-83900'

As before, you can pipe the result of pin_download() to your reader function:

diff --git a/dev/articles/pins-update.html b/dev/articles/pins-update.html
index e8493161..410d7e5c 100644
--- a/dev/articles/pins-update.html
+++ b/dev/articles/pins-update.html
@@ -126,7 +126,7 @@ 

Examples pin_write(board, head(mtcars), "mtcars") #> Guessing `type = 'rds'` -#> Creating new version '20240802T165221Z-f79b9' +#> Creating new version '20240802T172610Z-f79b9' #> Writing to pin 'mtcars' pin_read(board, "mtcars") #> mpg cyl disp hp drat wt qsec vs am gear carb @@ -165,7 +165,7 @@

Pinning filespin(path, "alphabet", board = "vignette") pin_get("alphabet", board = "vignette") -#> [1] "/tmp/Rtmp7fGDhI/file1ef061c089f4/alphabet/file1ef06efb0cf"

+#> [1] "/tmp/RtmpaWzapX/file1d78186f2e2d/alphabet/file1d781cb4d275"

pins 1.0.0 clearly separates the two cases of pin an object and pinning a file, so here instead of pin_write() and pin_read() you need to pin_upload() and @@ -173,9 +173,9 @@

Pinning files
 # Modern API
 board %>% pin_upload(path, "alphabet")
-#> Creating new version '20240802T165222Z-ee580'
+#> Creating new version '20240802T172611Z-ee580'
 board %>% pin_download("alphabet")
-#> [1] "~/.local/share/pins/alphabet/20240802T165222Z-ee580/file1ef06efb0cf"
+#> [1] "~/.local/share/pins/alphabet/20240802T172611Z-ee580/file1d781cb4d275"

Pinning a url @@ -187,7 +187,7 @@

Pinning a urlbase <- "https://raw.githubusercontent.com/rstudio/pins-r/main/tests/testthat/" (pin(paste0(base, "pin-files/first.txt"), board = "vignette")) -#> [1] "/tmp/Rtmp7fGDhI/file1ef061c089f4/first/first.txt"

+#> [1] "/tmp/RtmpaWzapX/file1d78186f2e2d/first/first.txt"

This now needs to be made explicit with the new board_url(), and since this returns a path, not a file, you need to use pin_download():

@@ -221,7 +221,7 @@

Implicit board board %>% pin_write(data.frame(x = 1:3), "test-data") #> Guessing `type = 'rds'` -#> Creating new version '20240802T165223Z-1422a' +#> Creating new version '20240802T172611Z-1422a' #> Writing to pin 'test-data' board %>% pin_read("test-data") #> x diff --git a/dev/articles/pins.html b/dev/articles/pins.html index 78b025f8..77386bc3 100644 --- a/dev/articles/pins.html +++ b/dev/articles/pins.html @@ -120,7 +120,7 @@

Reading and writing datamtcars <- tibble::as_tibble(mtcars) board %>% pin_write(mtcars, "mtcars") #> Guessing `type = 'rds'` -#> Creating new version '20240802T165225Z-f892e' +#> Creating new version '20240802T172613Z-f892e' #> Writing to pin 'mtcars'

The first argument is the object to save (usually a data frame, but it can be any R object), and the second argument gives the “name” of the @@ -219,14 +219,14 @@

Metadata#> $ description: NULL #> $ tags : NULL #> $ urls : NULL -#> $ created : POSIXct[1:1], format: "2024-08-02 16:52:25" +#> $ created : POSIXct[1:1], format: "2024-08-02 17:26:13" #> $ api_version: int 1 #> $ user : list() #> $ name : chr "mtcars" #> $ local :List of 3 -#> ..$ dir : 'fs_path' chr "/tmp/RtmpQ0fHE9/pins-1f3543e95741/mtcars/20240802T165225Z-f892e" +#> ..$ dir : 'fs_path' chr "/tmp/RtmpeLyco0/pins-1dbe2ede3775/mtcars/20240802T172613Z-f892e" #> ..$ url : NULL -#> ..$ version: chr "20240802T165225Z-f892e" +#> ..$ version: chr "20240802T172613Z-f892e"

This shows you the metadata that’s generated by default. This includes: