diff --git a/dev/apple-touch-icon-120x120.png b/dev/apple-touch-icon-120x120.png index 59310e03..0515cc51 100644 Binary files a/dev/apple-touch-icon-120x120.png and b/dev/apple-touch-icon-120x120.png differ diff --git a/dev/apple-touch-icon-152x152.png b/dev/apple-touch-icon-152x152.png index e0149862..b923d50e 100644 Binary files a/dev/apple-touch-icon-152x152.png and b/dev/apple-touch-icon-152x152.png differ diff --git a/dev/apple-touch-icon-180x180.png b/dev/apple-touch-icon-180x180.png index d42d4d0f..2d73c8fb 100644 Binary files a/dev/apple-touch-icon-180x180.png and b/dev/apple-touch-icon-180x180.png differ diff --git a/dev/apple-touch-icon-60x60.png b/dev/apple-touch-icon-60x60.png index 39c0014f..3c0a09b3 100644 Binary files a/dev/apple-touch-icon-60x60.png and b/dev/apple-touch-icon-60x60.png differ diff --git a/dev/apple-touch-icon-76x76.png b/dev/apple-touch-icon-76x76.png index df982d57..fcb826b7 100644 Binary files a/dev/apple-touch-icon-76x76.png and b/dev/apple-touch-icon-76x76.png differ diff --git a/dev/apple-touch-icon.png b/dev/apple-touch-icon.png index c3ecff4a..f9b09df0 100644 Binary files a/dev/apple-touch-icon.png and b/dev/apple-touch-icon.png differ diff --git a/dev/articles/customize-pins-metadata.html b/dev/articles/customize-pins-metadata.html index 65fd3ba1..838a458f 100644 --- a/dev/articles/customize-pins-metadata.html +++ b/dev/articles/customize-pins-metadata.html @@ -160,7 +160,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 '20231005T012634Z-dfe35'
+#> Creating new version '20231019T173317Z-1b599'
 #> Writing to pin 'letters-as-json'

A function to read factors @@ -170,7 +170,7 @@

A function to read factors
 board %>% pin_read("letters-as-json")
-#>  [1] "f" "i" "a" "g" "l" "h" "m" "j" "u" "w"
+#> [1] "w" "g" "b" "a" "o" "d" "f" "j" "c" "k"

Instead, we can also write a special function for reading, to reconstruct the factor including its levels:

@@ -181,7 +181,7 @@ 

A function to read factors} board %>% pin_read_factor_json("letters-as-json") -#> [1] f i a g l h m j u w +#> [1] w g b a o d f j c k #> Levels: a b c d e f g h i j k l m n o p q r s t u v w x y z

diff --git a/dev/articles/managing-custom-formats.html b/dev/articles/managing-custom-formats.html index 6422c2ba..e5055044 100644 --- a/dev/articles/managing-custom-formats.html +++ b/dev/articles/managing-custom-formats.html @@ -156,7 +156,7 @@

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

+#> Creating new version '20231019T173321Z-be312'

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

@@ -196,7 +196,7 @@

Function to manage uploadingpin_write():

 pin_upload_arrow(board, x = mtcars, name = "mtcars-arrow2")
-#> Creating new version '20231005T012639Z-be312'
+#> Creating new version '20231019T173322Z-be312'

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 f999c334..a3acf325 100644
--- a/dev/articles/pins-update.html
+++ b/dev/articles/pins-update.html
@@ -148,7 +148,7 @@ 

Examples pin_write(board, head(mtcars), "mtcars") #> Guessing `type = 'rds'` -#> Creating new version '20231005T012644Z-8df40' +#> Creating new version '20231019T173326Z-8df40' #> Writing to pin 'mtcars' pin_read(board, "mtcars") #> mpg cyl disp hp drat wt qsec vs am gear carb @@ -187,7 +187,7 @@

Pinning filespin(path, "alphabet", board = "vignette") pin_get("alphabet", board = "vignette") -#> [1] "/tmp/Rtmp4r2MQ1/file21022c7ba03a/alphabet/file2102252f359d"

+#> [1] "/tmp/Rtmph7Nfdk/file213a55420818/alphabet/file213a11b73ef1"

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 @@ -195,9 +195,9 @@

Pinning files
 # Modern API
 board %>% pin_upload(path, "alphabet")
-#> Creating new version '20231005T012646Z-ee580'
+#> Creating new version '20231019T173328Z-ee580'
 board %>% pin_download("alphabet")
-#> [1] "~/.local/share/pins/alphabet/20231005T012646Z-ee580/file2102252f359d"
+#> [1] "~/.local/share/pins/alphabet/20231019T173328Z-ee580/file213a11b73ef1"

Pinning a url @@ -209,7 +209,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/Rtmp4r2MQ1/file21022c7ba03a/first/first.txt"

+#> [1] "/tmp/Rtmph7Nfdk/file213a55420818/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():

@@ -243,7 +243,7 @@

Implicit board board %>% pin_write(data.frame(x = 1:3), "test-data") #> Guessing `type = 'rds'` -#> Creating new version '20231005T012646Z-59306' +#> Creating new version '20231019T173329Z-59306' #> Writing to pin 'test-data' board %>% pin_read("test-data") #> x diff --git a/dev/articles/pins.html b/dev/articles/pins.html index f9cf522a..11f0b191 100644 --- a/dev/articles/pins.html +++ b/dev/articles/pins.html @@ -142,7 +142,7 @@

Reading and writing datamtcars <- tibble::as_tibble(mtcars) board %>% pin_write(mtcars, "mtcars") #> Guessing `type = 'rds'` -#> Creating new version '20231005T012650Z-66c17' +#> Creating new version '20231019T173332Z-66c17' #> 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 @@ -217,7 +217,7 @@

Metadatapin_meta():

 board %>% pin_meta("mtcars")
-#> List of 12
+#> List of 13
 #>  $ file       : chr "mtcars.rds"
 #>  $ file_size  : 'fs_bytes' int 900
 #>  $ pin_hash   : chr "66c17690da0cee83"
@@ -225,14 +225,15 @@ 

Metadata#> $ title : chr "mtcars: a pinned 32 x 11 data frame" #> $ description: NULL #> $ tags : NULL -#> $ created : POSIXct[1:1], format: "2023-10-05 01:26:50" +#> $ urls : NULL +#> $ created : POSIXct[1:1], format: "2023-10-19 17:33:32" #> $ api_version: int 1 #> $ user : list() #> $ name : chr "mtcars" #> $ local :List of 3 -#> ..$ dir : 'fs_path' chr "/tmp/RtmpgIEpJc/pins-214f2bb940be/mtcars/20231005T012650Z-66c17" +#> ..$ dir : 'fs_path' chr "/tmp/RtmpgNKgRg/pins-21867f5c2dab/mtcars/20231019T173332Z-66c17" #> ..$ url : NULL -#> ..$ version: chr "20231005T012650Z-66c17"

+#> ..$ version: chr "20231019T173332Z-66c17"

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

@@ -168,7 +171,7 @@

Examples
b <- board_temp()
 b %>% pin_write(head(mtcars), "mtcars", metadata = list("Hadley" = TRUE))
 #> Guessing `type = 'rds'`
-#> Creating new version '20231005T012625Z-8df40'
+#> Creating new version '20231019T173308Z-8df40'
 #> Writing to pin 'mtcars'
 
 # Get the pin
@@ -182,7 +185,7 @@ 

Examples#> Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1 # Get its metadata b %>% pin_meta("mtcars") -#> List of 12 +#> List of 13 #> $ file : chr "mtcars.rds" #> $ file_size : 'fs_bytes' int 425 #> $ pin_hash : chr "8df403c9bfd86c78" @@ -190,26 +193,27 @@

Examples#> $ title : chr "mtcars: a pinned 6 x 11 data frame" #> $ description: NULL #> $ tags : NULL -#> $ created : POSIXct[1:1], format: "2023-10-05 01:26:25" +#> $ urls : NULL +#> $ created : POSIXct[1:1], format: "2023-10-19 17:33:08" #> $ api_version: int 1 #> $ user :List of 1 #> ..$ Hadley: logi TRUE #> $ name : chr "mtcars" #> $ local :List of 3 -#> ..$ dir : 'fs_path' chr "/tmp/RtmpBMWHb9/pins-18f91d413100/mtcars/20231005T012625Z-8df40" +#> ..$ dir : 'fs_path' chr "/tmp/Rtmpyz8J8k/pins-1931ddd4455/mtcars/20231019T173308Z-8df40" #> ..$ url : NULL -#> ..$ version: chr "20231005T012625Z-8df40" +#> ..$ version: chr "20231019T173308Z-8df40" # Get path to underlying data b %>% pin_download("mtcars") -#> [1] "/tmp/RtmpBMWHb9/pins-18f91d413100/mtcars/20231005T012625Z-8df40/mtcars.rds" +#> [1] "/tmp/Rtmpyz8J8k/pins-1931ddd4455/mtcars/20231019T173308Z-8df40/mtcars.rds" # Use tags instead b %>% pin_write(tail(mtcars), "mtcars", tags = c("fuel-efficiency", "automotive")) #> Guessing `type = 'rds'` -#> Replacing version '20231005T012625Z-8df40' with '20231005T012625Z-acdff' +#> Replacing version '20231019T173308Z-8df40' with '20231019T173308Z-acdff' #> Writing to pin 'mtcars' b %>% pin_meta("mtcars") -#> List of 12 +#> List of 13 #> $ file : chr "mtcars.rds" #> $ file_size : 'fs_bytes' int 465 #> $ pin_hash : chr "acdff317b06bb19c" @@ -217,14 +221,15 @@

Examples#> $ title : chr "mtcars: a pinned 6 x 11 data frame" #> $ description: NULL #> $ tags : chr [1:2] "fuel-efficiency" "automotive" -#> $ created : POSIXct[1:1], format: "2023-10-05 01:26:25" +#> $ urls : NULL +#> $ created : POSIXct[1:1], format: "2023-10-19 17:33:08" #> $ api_version: int 1 #> $ user : list() #> $ name : chr "mtcars" #> $ local :List of 3 -#> ..$ dir : 'fs_path' chr "/tmp/RtmpBMWHb9/pins-18f91d413100/mtcars/20231005T012625Z-acdff" +#> ..$ dir : 'fs_path' chr "/tmp/Rtmpyz8J8k/pins-1931ddd4455/mtcars/20231019T173308Z-acdff" #> ..$ url : NULL -#> ..$ version: chr "20231005T012625Z-acdff" +#> ..$ version: chr "20231019T173308Z-acdff"

diff --git a/dev/reference/pin_read.html b/dev/reference/pin_read.html index 99f26b95..6f082c8e 100644 --- a/dev/reference/pin_read.html +++ b/dev/reference/pin_read.html @@ -93,6 +93,7 @@

Usage metadata = NULL, versioned = NULL, tags = NULL, + urls = NULL, force_identical_write = FALSE ) @@ -161,6 +162,11 @@

ArgumentsExamples b %>% pin_write(1:10, "x", description = "10 numbers") #> Guessing `type = 'rds'` -#> Creating new version '20231005T012627Z-1d13c' +#> Creating new version '20231019T173310Z-1d13c' #> Writing to pin 'x' b #> Pin board <pins_board_folder> -#> Path: '/tmp/RtmpBMWHb9/pins-18f973568b3e' +#> Path: '/tmp/Rtmpyz8J8k/pins-1931f9c0469' #> Cache size: 0 b %>% pin_meta("x") -#> List of 12 +#> List of 13 #> $ file : chr "x.rds" #> $ file_size : 'fs_bytes' int 61 #> $ pin_hash : chr "1d13c1194f9cea48" @@ -203,21 +209,22 @@

Examples#> $ title : chr "x: a pinned integer vector" #> $ description: chr "10 numbers" #> $ tags : NULL -#> $ created : POSIXct[1:1], format: "2023-10-05 01:26:27" +#> $ urls : NULL +#> $ created : POSIXct[1:1], format: "2023-10-19 17:33:10" #> $ api_version: int 1 #> $ user : list() #> $ name : chr "x" #> $ local :List of 3 -#> ..$ dir : 'fs_path' chr "/tmp/RtmpBMWHb9/pins-18f973568b3e/x/20231005T012627Z-1d13c" +#> ..$ dir : 'fs_path' chr "/tmp/Rtmpyz8J8k/pins-1931f9c0469/x/20231019T173310Z-1d13c" #> ..$ url : NULL -#> ..$ version: chr "20231005T012627Z-1d13c" +#> ..$ version: chr "20231019T173310Z-1d13c" b %>% pin_read("x") #> [1] 1 2 3 4 5 6 7 8 9 10 # Add a new version b %>% pin_write(2:11, "x") #> Guessing `type = 'rds'` -#> Creating new version '20231005T012627Z-30caa' +#> Creating new version '20231019T173310Z-30caa' #> Writing to pin 'x' b %>% pin_read("x") #> [1] 2 3 4 5 6 7 8 9 10 11 @@ -227,8 +234,8 @@

Examples#> # A tibble: 2 × 3 #> version created hash #> <chr> <dttm> <chr> -#> 1 20231005T012627Z-1d13c 2023-10-05 01:26:27 1d13c -#> 2 20231005T012627Z-30caa 2023-10-05 01:26:27 30caa +#> 1 20231019T173310Z-1d13c 2023-10-19 17:33:10 1d13c +#> 2 20231019T173310Z-30caa 2023-10-19 17:33:10 30caa b %>% pin_read("x", version = .Last.value$version[[1]]) #> [1] 2 3 4 5 6 7 8 9 10 11 # (Normally you'd specify the version with a string, but since the diff --git a/dev/reference/pin_search.html b/dev/reference/pin_search.html index 95c0630c..467925ec 100644 --- a/dev/reference/pin_search.html +++ b/dev/reference/pin_search.html @@ -117,35 +117,35 @@

Examples board %>% pin_write(1:5, "x", title = "Some numbers") #> Guessing `type = 'rds'` -#> Creating new version '20231005T012628Z-d5d32' +#> Creating new version '20231019T173311Z-d5d32' #> Writing to pin 'x' board %>% pin_write(letters[c(1, 5, 10, 15, 21)], "y", title = "My favourite letters") #> Guessing `type = 'rds'` -#> Creating new version '20231005T012628Z-20f47' +#> Creating new version '20231019T173311Z-20f47' #> Writing to pin 'y' board %>% pin_write(runif(20), "z", title = "Random numbers") #> Guessing `type = 'rds'` -#> Creating new version '20231005T012628Z-1b504' +#> Creating new version '20231019T173311Z-4b8bb' #> Writing to pin 'z' board %>% pin_search() #> # A tibble: 3 × 6 #> name type title created file_size meta #> <chr> <chr> <chr> <dttm> <fs::byt> <list> -#> 1 x rds Some numbers 2023-10-05 01:26:28 50 <pins_met> -#> 2 y rds My favourite lette… 2023-10-05 01:26:28 58 <pins_met> -#> 3 z rds Random numbers 2023-10-05 01:26:28 169 <pins_met> +#> 1 x rds Some numbers 2023-10-19 17:33:11 50 <pins_met> +#> 2 y rds My favourite lette… 2023-10-19 17:33:11 58 <pins_met> +#> 3 z rds Random numbers 2023-10-19 17:33:11 170 <pins_met> board %>% pin_search("number") #> # A tibble: 2 × 6 #> name type title created file_size meta #> <chr> <chr> <chr> <dttm> <fs::bytes> <list> -#> 1 x rds Some numbers 2023-10-05 01:26:28 50 <pins_met> -#> 2 z rds Random numbers 2023-10-05 01:26:28 169 <pins_met> +#> 1 x rds Some numbers 2023-10-19 17:33:11 50 <pins_met> +#> 2 z rds Random numbers 2023-10-19 17:33:11 170 <pins_met> board %>% pin_search("letters") #> # A tibble: 1 × 6 #> name type title created file_size meta #> <chr> <chr> <chr> <dttm> <fs::byt> <list> -#> 1 y rds My favourite lette… 2023-10-05 01:26:28 58 <pins_met> +#> 1 y rds My favourite lette… 2023-10-19 17:33:11 58 <pins_met>