Whenever you run pin(resource), the resource is stored; by default, this means storing it locally on your computer for the purposes of caching it to avoid re-downloads, recomputing, etc. We can explore this local storage by creating a pin and then enumerating the board’s storage folder:

library(pins)
pin(mtcars)
tibble::tibble(paths = dir(board_local_storage(), full.names = TRUE))
# A tibble: 2 x 1
   paths                                                
   <chr>                                                
 1 /private/var/folders/ks/RtmpL6bsZy/file5d7f/temp/data.txt     
 2 /private/var/folders/ks/RtmpL6bsZy/file5d7f/temp/mtcars            

As you can see, each pin is stored inside the temp folder and a list of resources is tracked on a data.txt file. The function pin() and pin_get() store and retrieve data from this well-known location, while pin_find() makes use of the index file to search for resources and track other properties like cache expiration information.

To avoid pins being reset aftere your R session restarts, you can register and use a ‘local’ board and explicitly store or retrieve datasets from this board:

board_register_local()

pin(mtcars, name = "mtcars", board = "local")
pin_get("mtcars", board = "local")

A local board is quite useful for all the reasons mentioned in the Getting Started article; however, to take full advantage of pins, you can also consider storing pins in shared locations that others can access, for instance:

GitHub
GitHub is an American company that provides hosting for software development version control using Git and a subsidiary of Microsoft. GitHub offers plans for free, professional, and enterprise accounts; but free accounts are commonly used to host open source projects. While GitHub is mostly known to be used as a code repository, it is a common practice to also use GitHub to store datasets. However, GitHub works best with datasets under 25MB before workarounds like Git LFS and release files to support up to 2GB resources. You can learn more about using pins with GitHub in the GitHub Board article.
Kaggle
Kaggle is an online community of data scientists and machine learners, owned by Google LLC. Kaggle allows users to find and publish data sets, explore and build models in a web-based data-science environment, work with other data scientists and machine learning engineers, and enter competitions to solve data science challenges. Kaggle supports storing datasets up to 10GB in size and is free of charge for public datasets. You can learn more about using pins with GitHub in the Kaggle Board article.
RStudio Connect
RStudio Connect is a publishing platform for the work your teams create in R and Python. You can share Shiny applications, R Markdown reports, Plumber APIs, dashboards, plots, Jupyter Notebooks, and more in one convenient place. RStudio Connect can be used to store private datasets and is only limited by the physical storage capacity configured in your server, learn to configure RStudio Connect in the RStudio Connect Board article.

However, since there are many more storage locations to consider (see for instance Where should scientists store their data), pins also supports web-accessible locations through Website Boards and even custom boards to fully-support reading, writing, authentication and so on. You can learn how to create extensions at Extending Boards.

Please be mindful when using boards, you should only register boards you trust. As a general good practice, when using GitHub, it is not advisable to clone and build R packages from GitHub repos you don’t trust. In a similar way, you should not register GitHub boards, nor Kaggle, nor RStudio Connect, nor Website boards that you don’t trust.