dw_copy_chart: Makes a copy of an existing Datawrapper chart

View source: R/dw_copy_chart.R

dw_copy_chartR Documentation

Makes a copy of an existing Datawrapper chart

Description

\lifecycle

maturing Creates a new Datawrapper chart object from an existing chart. This function starts the chart-making process like dw_create_chart.

Usage

dw_copy_chart(copy_from, api_key = "environment")

Arguments

copy_from

Required. Chart_id from an existing chart which serves as the template.

api_key

Required. A Datawrapper-API-key as character string. Defaults to "environment" - tries to automatically retrieve the key that's stored in the .Reviron-file by datawrapper_auth.

Value

It prints the new chart's id and returns a S3-structure of type dw_chart with the elements from the Datawrapper-API, the same as in dw_retrieve_chart_metadata and dw_create_chart.

Author(s)

Benedict Witzenberger

Examples


## Not run: 
dw_copy_chart(copy_from = "ABCDE")
# uses api-key from environment - if set.

## End(Not run)

## Not run: 
dw_copy_chart(copy_from = "ABCDE", api_key = "1234ABCD")

## End(Not run) # uses the specified key


munichrocker/DatawRappr documentation built on March 20, 2024, 6:08 a.m.