dvCreateStudy: Create a study in a named Dataverse

Description Usage Arguments Details Value Author(s) See Also

View source: R/dvCreateStudy.r

Description

Use Data Deposit API to create a study in a Dataverse.

Usage

1
2
3
dvCreateStudy(  dvname, xmlfile, dv=getOption('dvn'),
                user=getOption('dvn.user'), pwd=getOption('dvn.pwd'), 
                browser=FALSE, ...)

Arguments

dvname

A character string containing the name of a dataverse collection. Must be a dataverse accessible to this user (perhaps as extracted from dvServiceDoc.

xmlfile

The path to an XML file (or a character string of that XML) containing a Qualified Dublin Core Atom/XML document, which specifies the metadata necessary to create the study. See references for an example and dvBuildMetadata.

dv

An optional character string specifying the Dataverse to query. Default is the Harvard IQSS Dataverse.

user

A character string containing a dataverse username. Default is options('dvn.user').

pwd

A character string containing the corresponding dataverse password. Default is options('dvn.pwd').

browser

A logical specifying whether the query should be executed in a web browser. Default is FALSE.

...

Optionally, additional arguments passed to curlPerform via dvDepositQuery.

Details

This function creates a study in a dataverse using a Qualified Dublin Core Atom/XML document (possibly built by dvBuildMetadata). This document must contain a title, with all other fields being optional.

For the dvname argument, it is also possible to simply pass the “dvServiceDoc” object directly in lieu of naming a dataverse: dCreateStudy(dvServiceDoc(),"atom.xml"). In this case, if the user has access to more than one dataverse collection, an error will be produced.

Creating a study only changes the study in “draft”. To make a study public (and thus visible online or via dvSearch), the study needs to be subsequently released with dvReleaseStudy. It can also be deleted with dvDeleteStudy. Note: A released study can be “deaccessioned” (replacing its public record with a publicly visible record about its previous release) using dvDeleteStudy but cannot be deleted.

Value

If successful, a list containing:

bibliographicCitation

A full citation for the study, compiled from metadata.

generator

A vector containing details about the SWORD application.

id

The full URI for the study.

objectId

The objectId for the study.

xml

A character string containing an XML data structure that includes a study citation and handle.

Author(s)

Thomas J. Leeper

See Also

dvBuildMetadata dvAddFile dvEditStudy dvReleaseStudy dvDeleteStudy


dvn documentation built on May 29, 2017, 5:53 p.m.