% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dsROCrate.R
\name{init}
\alias{init}
\alias{init.opal}
\alias{init.rocrate}
\title{Initialise a Five Safes RO-Crate}
\usage{
init(x, ...)

\method{init}{opal}(
  x,
  ...,
  rocrate = rocrateR::rocrate_5s(),
  profile = "default",
  project = NULL,
  resources = NULL,
  tables = NULL,
  path = NULL,
  user = NULL
)

\method{init}{rocrate}(
  x,
  ...,
  connection = attr(x, "connection"),
  path = attr(x, "path"),
  profile = attr(x, "profile"),
  project = attr(x, "project"),
  resources = attr(x, "resources"),
  tables = attr(x, "tables"),
  user = attr(x, "user")
)
}
\arguments{
\item{x}{This can be a connection to a 'DataSHIELD' server (e.g., object with
the \code{opal} class, see \code{\link[opalr:opal.login]{opalr::opal.login()}}), an RO-Crate
(\link[rocrateR:rocrate]{rocrate} class) or a string with the path to an
RO-Crate.}

\item{...}{Other optional arguments. See the full documentation,
\code{\link[=init]{?dsROCrate::init}}.}

\item{rocrate}{RO-Crate object. Optional, if \code{x} is either an RO-Crate
object or a path to a valid RO-Crate. If so, then \code{connection} is
required (default: \code{rocrateR::rocrate_5s()}).}

\item{profile}{String with profile name (used for OBiBa's Opal backend).}

\item{project}{String with the name of the \link[=safe_project]{Safe Project}.}

\item{resources}{Vector of strings with the names of the resources, part of
\code{project}. Optional, if not provided, all the resources associated to
\code{project} will be included in the RO-Crate.}

\item{tables}{Vector of strings with the names of the tables/datasets, part
of \code{project}. Optional, if not provided, all the tables/datasets
associated to \code{project} will be included in the RO-Crate.}

\item{path}{String with path pointing to the root of the RO-Crate. This will
be used to store log files. If not provided, logs will be stored within
the RO-Crate returned by this function.}

\item{user}{List (or \link[rocrateR:entity]{entity} object) with details for
the Safe People, it must include \verb{@id} and \code{name} entries. Alternatively,
this can be a string with the \code{name} of the current user.}

\item{connection}{Connection object for the 'DataSHIELD' server where the
values will be extracted from (e.g., OBiBa's Opal). Optional, if \code{x} is
set to a connection object. If so, then \code{rocrate} is required.}
}
\value{
Five Safes RO-Crate object.
}
\description{
Creates a new RO-Crate configured for Five Safes auditing.
}
\references{
Wilkinson, M., Dumontier, M., Aalbersberg, I. et al. (2016) The FAIR Guiding
Principles for scientific data management and stewardship. Sci Data 3,
160018. https://doi.org/10.1038/sdata.2016.18
}
