append_data_frame_to_stream: Append an R data frame to a data.world stream.

Description Usage Arguments Value Examples

View source: R/append_to_stream.R

Description

Append an R data frame to a data.world stream. If the data.world API returns an HTTP status of 429 (Too Many Requests), this function uses RETRY to retry the request.

Usage

1
2
3
4
5
6
7
8
append_data_frame_to_stream(
  owner_id,
  dataset_id,
  stream_id,
  data_frame,
  retry_times = 3,
  retry_quiet = FALSE
)

Arguments

owner_id

User name and unique identifier of the creator of a dataset or project

dataset_id

Dataset unique identifier

stream_id

Stream unique identifier as defined by the user the first time the stream was used. Only lower case letters, numbers and dashes are allowed.

data_frame

The data frame containing the rows to append to the stream

retry_times

the number of times to retry the request

retry_quiet

whether to suppress diagnostic messages during retries

Value

Server response message.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
  aDf <- data.frame(ID=1:2, Value=c('One', 'Two'), stringsAsFactors = FALSE)
  dwapi::append_data_frame_to_stream(owner_id = 'user',
    dataset_id = 'dataset', stream_id = 'mystream',
    aDf)
  aDf <- data.frame(ID=1:2, Value=c('One', 'Two'), stringsAsFactors = FALSE)
  dwapi::append_data_frame_to_stream(owner_id = 'user',
    dataset_id = 'dataset', stream_id = 'mystream',
    aDf, retry_times = 10, retry_quiet = TRUE)

## End(Not run)

datadotworld/dwapi-r documentation built on July 3, 2021, 3:40 a.m.