Local board (legacy API)Source:
board_register_local(), which allows you to
access local pins created in earlier versions of the pins package. For
new pins, we recommend that you transition to
supports the new pins API.
legacy_temp() creates a legacy board in a temporary location, for use
in tests and examples.
legacy_local(path = NULL, name = "local", versions = FALSE) board_register_local(name = "local", cache = NULL, ...) legacy_temp(name = "temp", ...)
Path where pins will be stored. If not supplied, defaults to a system cache directory, which may be deleted by the operating system if you run out of disk space.
An optional name used identify the board. This is no longer generally needed since you should be passing around an explicit board object.
Should this board be registered with support for versions?
Cache path. Every board requires a local cache to avoid downloading files multiple times. The default stores in a standard cache location for your operating system, but you can override if needed.
Additional parameters required to initialize a particular board.
# Old api pin(data.frame(x = 1:3), "test") pin_get("test") #> x #> 1 1 #> 2 2 #> 3 3 # New api board <- board_local() board %>% pin_write(data.frame(x = 1:3), "test") #> Guessing `type = 'rds'` #> Creating new version '20211215T131100Z-ec2a9' #> Writing to pin 'test' board %>% pin_read("test") #> x #> 1 1 #> 2 2 #> 3 3