Rename an R object you're reusing
Usage
new_name(old, new, board = reuse::board())
Arguments
- old, new
String. The name of the old and new objects.
- board
A pin board, created by
board_folder()
,board_rsconnect()
,board_url()
or anotherboard_
function.
Examples
library(pins)
board <- board_temp()
x <- 1
x %>% reuse("old", board)
#> Creating new version '20220427T134427Z-4ebb2'
#> Writing to pin 'old'
#> [1] 1
pin_exists("old", board = board)
#> [1] TRUE
"old" %>% new_name("new", board)
#> Creating new version '20220427T134428Z-4ebb2'
#> Writing to pin 'new'
pin_exists("old", board = board)
#> [1] FALSE
pin_exists("new", board = board)
#> [1] TRUE