These functions can be used to work with pins, developed by RStudio.

export_pin(
  x,
  name = NULL,
  title = NULL,
  type = NULL,
  description = NULL,
  board = pins_board()
)

import_pin(name, version = NULL, hash = NULL, board = pins_board())

remove_pin(name, version = NULL, board = pins_board())

pins_board(
  projects_channel_id = read_secret("teams.projects.channel_id"),
  account = connect_teams(),
  delete_by_item = TRUE
)

Arguments

x

An object (typically a data frame) to pin.

name

Pin name.

title

A title for the pin; most important for shared boards so that others can understand what the pin contains. If omitted, a brief description of the contents will be automatically generated.

type

File type used to save x to disk. Must be one of "csv", "json", "rds", "parquet", "arrow", or "qs". If not supplied, will use JSON for bare lists and RDS for everything else. Be aware that CSV and JSON are plain text formats, while RDS, Parquet, Arrow, and qs are binary formats.

description

A detailed description of the pin contents.

board

A pin board, created by board_folder(), board_connect(), board_url() or another board_ function.

version

Retrieve a specific version of a pin. Use pin_versions() to find out which versions are available and when they were created.

hash

Specify a hash to verify that you get exactly the dataset that you expect. You can find the hash of an existing pin by looking for pin_hash in pin_meta().

projects_channel_id

Teams channel ID of the projects

account

a Microsoft 365 account to use for looking up properties. This has to be an object as returned by connect_teams() or Microsoft365R::get_team().

delete_by_item

Whether to handle folder deletions on an item-by-item basis, rather than deleting the entire folder at once. You may need to set this to TRUE for a board in SharePoint Online or OneDrive for Business, due to document protection policies that prohibit deleting non-empty folders.

Details

These functions from the pins package are integrated into the team's Microsoft 365 account, using the "pins" folder in the given MS Teams channel.

For Pins functions of the pins package, use pins_board() as input, e.g.:

The following pins functions are re-exported by this package: pin_list(), pin_meta(), and pin_versions().

The pins_board() function returns a pins::board_ms365 object based on the "pins" folder in the Teams channel Projects, which is retrieved with teams_projects_channel().