diff --git a/dev/apple-touch-icon-120x120.png b/dev/apple-touch-icon-120x120.png index c899d071..27155a02 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 83ea47bf..6fc84f88 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 97891e8c..7304c741 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 f5c62c62..3b4b2f7e 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 d4aa56d9..acdc56d8 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 610f7d0a..e3c6783f 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 56af5377..42a0f7bc 100644 --- a/dev/articles/customize-pins-metadata.html +++ b/dev/articles/customize-pins-metadata.html @@ -160,7 +160,7 @@
ten_letters <- factor(sample(letters, size = 10), levels = letters)
board %>% pin_write_factor_json(ten_letters, "letters-as-json")
-#> Creating new version '20240108T172501Z-c5c22'
+#> Creating new version '20240113T004358Z-38ec1'
#> Writing to pin 'letters-as-json'
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] d j p t m o e h k x +#> [1] x d z b w k g q h s #> 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
Reading from the downloaded pin is straightforward;
pin_download()
returns a local path that can be piped to
arrow::read_feather()
:
pin_upload_arrow(board, x = mtcars, name = "mtcars-arrow2")
-#> Creating new version '20240108T172504Z-0128c'
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 0ad4a663..0408eb69 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 '20240108T172507Z-0a03e' +#> Creating new version '20240113T004405Z-0a03e' #> 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/RtmpR1NRHC/file2001bde27ec/alphabet/file200159c29086"
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 @@
# Modern API
board %>% pin_upload(path, "alphabet")
-#> Creating new version '20240108T172509Z-ee580'
+#> Creating new version '20240113T004406Z-ee580'
board %>% pin_download("alphabet")
-#> [1] "~/.local/share/pins/alphabet/20240108T172509Z-ee580/file200159c29086"
+#> [1] "~/.local/share/pins/alphabet/20240113T004406Z-ee580/file20599d377d5"
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()
:
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 @@ -241,14 +241,14 @@
This shows you the metadata that’s generated by default. This includes:
While we’ll do our best to keep the automatically generated metadata
consistent over time, I’d recommend manually capturing anything you
really care about in metadata
.
You can list all the available versions with
pin_versions()
:
You can delete a specific older version with
pin_version_delete()
or sets of older versions with
pin_versions_prune()
.
board %>% pin_upload(paths, "example")
-#> Creating new version '20240108T172513Z-e9d42'
pin_download()
returns a vector of paths:
board %>% pin_download("example")
-#> [1] "/tmp/RtmpT0hTbZ/pins-204d71429972/example/20240108T172513Z-e9d42/mtcars.csv"
-#> [2] "/tmp/RtmpT0hTbZ/pins-204d71429972/example/20240108T172513Z-e9d42/alphabet.txt"
It’s now your job to handle them. You should treat these paths as internal implementation details — never modify them and never save them for use outside of pins.
@@ -399,7 +399,7 @@
board %>% pin_download("mtcars")
-#> [1] "/tmp/RtmpT0hTbZ/pins-204d71429972/mtcars/20240108T172511Z-7c7a6/mtcars.rds"
board %>% pin_write(mtcars, type = "json")
#> Using `name = 'mtcars'`
-#> Creating new version '20240108T172523Z-c2702'
+#> Creating new version '20240113T004419Z-c2702'
#> Writing to pin 'mtcars'
Let’s make a new version of this data by adding a column:
lper100km
, consumption in liters per 100 km. This could
@@ -161,7 +161,7 @@
Let’s check our board to ensure we have one pin named
"mtcars"
, with two versions:
Because a board_url()
is consumed over the web, it
doesn’t have access to a file system the way, for example, a
board_folder()
has; we can work around this by creating a
@@ -199,8 +199,8 @@
mtcars:
-- mtcars/20240108T172523Z-c2702/
-- mtcars/20240108T172525Z-8416c/
+- mtcars/20240113T004419Z-c2702/
+- mtcars/20240113T004421Z-8416c/
At this point, we would publish the folder containing the board as a
part of a web site. Let’s pretend that we have served the folder from
our fake website, https://not.real.website.co/pins/
.
We can read the most-recent version of the "mtcars"
pin:
@@ -274,10 +274,10 @@pkgdown
The R Packages book suggests using a folder called
data-raw
for working with datasets; this can be adapted to -use pins. You would start withusethis::use_data_raw()
. In +use pins. You would start withusethis::use_data_raw()
. In a file in your/data-raw
directory, wrangle and clean your datasets in the same way as if you were going to use -usethis::use_data()
. To offer such datasets on a web-based +usethis::use_data()
. To offer such datasets on a web-based board instead of as a built-in package dataset, in your/data-raw
file you would:diff --git a/dev/favicon-16x16.png b/dev/favicon-16x16.png index ecaadad3..7d02f8ab 100644 Binary files a/dev/favicon-16x16.png and b/dev/favicon-16x16.png differ diff --git a/dev/favicon-32x32.png b/dev/favicon-32x32.png index de8e0bbd..4f41326d 100644 Binary files a/dev/favicon-32x32.png and b/dev/favicon-32x32.png differ diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index fcf651bf..842ca05f 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -8,7 +8,7 @@ articles: pins: pins.html posit-connect: posit-connect.html using-board-url: using-board-url.html -last_built: 2024-01-08T17:24Z +last_built: 2024-01-13T00:43Z urls: reference: https://pins.rstudio.com/reference article: https://pins.rstudio.com/articles diff --git a/dev/reference/board_register.html b/dev/reference/board_register.html index f1ab147e..e2e1f024 100644 --- a/dev/reference/board_register.html +++ b/dev/reference/board_register.html @@ -147,7 +147,7 @@
Examplesboard %>% pin_write(mtcars) #> Using `name = 'mtcars'` #> Guessing `type = 'rds'` -#> Creating new version '20240108T172447Z-b755f' +#> Creating new version '20240113T004344Z-b755f' #> Writing to pin 'mtcars' board %>% pin_read("mtcars") #> mpg cyl disp hp drat wt qsec vs am gear carb diff --git a/dev/reference/legacy_local.html b/dev/reference/legacy_local.html index a12fc2dc..313d1356 100644 --- a/dev/reference/legacy_local.html +++ b/dev/reference/legacy_local.html @@ -142,7 +142,7 @@
Examplesboard <- board_local() board %>% pin_write(data.frame(x = 1:3), "test") #> Guessing `type = 'rds'` -#> Creating new version '20240108T172450Z-d376d' +#> Creating new version '20240113T004348Z-d376d' #> Writing to pin 'test' board %>% pin_read("test") #> x diff --git a/dev/reference/pin.html b/dev/reference/pin.html index 0f228ce5..af3b17b0 100644 --- a/dev/reference/pin.html +++ b/dev/reference/pin.html @@ -163,7 +163,7 @@
Examplesboard %>% pin_write(mtcars) #> Using `name = 'mtcars'` #> Guessing `type = 'rds'` -#> Creating new version '20240108T172451Z-b755f' +#> Creating new version '20240113T004348Z-b755f' #> Writing to pin 'mtcars' board %>% pin_read("mtcars") #> mpg cyl disp hp drat wt qsec vs am gear carb diff --git a/dev/reference/pin_browse.html b/dev/reference/pin_browse.html index 5b1ce501..7e6d9d2e 100644 --- a/dev/reference/pin_browse.html +++ b/dev/reference/pin_browse.html @@ -110,19 +110,19 @@
Examples
board <- board_temp(versioned = TRUE) board %>% pin_write(1:10, "x") #> Guessing `type = 'rds'` -#> Creating new version '20240108T172451Z-709c5' +#> Creating new version '20240113T004349Z-709c5' #> Writing to pin 'x' board %>% pin_write(1:11, "x") #> Guessing `type = 'rds'` -#> Creating new version '20240108T172451Z-f6f8c' +#> Creating new version '20240113T004349Z-f6f8c' #> Writing to pin 'x' board %>% pin_write(1:12, "x") #> Guessing `type = 'rds'` -#> Creating new version '20240108T172451Z-94347' +#> Creating new version '20240113T004349Z-94347' #> Writing to pin 'x' board %>% pin_browse("x", local = TRUE) -#> ℹ Pin at </tmp/RtmpQOlTqP/pins-180d4d8f0df6/x/20240108T172451Z-f6f8c> +#> ℹ Pin at </tmp/RtmpluyHpK/pins-18697712ae8/x/20240113T004349Z-f6f8c>