Learn R Programming

dwapi (version 0.1.3.1)

replace_project: Create a new project with a specific ID, replacing a project with that ID if it exists.

Description

Create a new project with a specific ID, replacing a project with that ID if it exists.

Usage

replace_project(owner_id, project_id, replace_project_req)

Arguments

owner_id

data.world user name of the project owner.

project_id

identifier to use for the new project, or identifier of existing project to replace with the newly created project.

replace_project_req

Request object of type project_replace_request.

Value

Object of type success_message.

Examples

Run this code
# NOT RUN {
request <- dwapi::project_replace_request(
  title='testproject', visibility = 'OPEN',
  objective = 'Test project by R-SDK', tags = c('rsdk', 'sdk', 'arr'),
  license = 'Public Domain')

request <- dwapi::add_file(request = request, name = 'file4.csv',
  url = 'https://data.world/file4.csv')

# }
# NOT RUN {
dwapi::replace_project(create_project_req = request,
  owner_id = 'user', project_id = 'projectid')
# }

Run the code above in your browser using DataLab