% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dq_report2.R
\name{dq_report2}
\alias{dq_report2}
\title{Generate a full DQ report, v2}
\usage{
dq_report2(
  study_data,
  item_level = "item_level",
  label_col = LABEL,
  meta_data_segment = "segment_level",
  meta_data_dataframe = "dataframe_level",
  meta_data_cross_item = "cross-item_level",
  meta_data_item_computation = "item_computation_level",
  meta_data = item_level,
  meta_data_v2,
  ...,
  dimensions = c("Completeness", "Consistency"),
  cores = list(mode = "socket", logging = FALSE, cpus = util_detect_cores(),
    load.balancing = TRUE),
  ignore_empty_vars = getOption("dataquieR.ignore_empty_vars",
    dataquieR.ignore_empty_vars_default),
  specific_args = list(),
  advanced_options = list(),
  author = prep_get_user_name(),
  title = "Data quality report",
  subtitle = as.character(Sys.Date()),
  user_info = NULL,
  debug_parallel = FALSE,
  resp_vars = character(0),
  filter_indicator_functions = character(0),
  exclude_indicator_functions = character(0),
  filter_result_slots = c("^Summary", "^Segment", "^DataTypePlotList",
    "^ReportSummaryTable", "^Dataframe", "^Result", "^VariableGroup"),
  mode = c("default", "futures", "queue", "parallel"),
  mode_args = list(),
  notes_from_wrapper = list(),
  storr_factory = NULL,
  amend = FALSE,
  cross_item_level,
  `cross-item_level`,
  segment_level,
  dataframe_level,
  item_computation_level,
  .internal = rlang::env_inherits(rlang::caller_env(), parent.env(environment())),
  checkpoint_resumed = getOption("dataquieR.resume_checkpoint",
    dataquieR.resume_checkpoint_default),
  name_of_study_data,
  dt_adjust = as.logical(getOption("dataquieR.dt_adjust", dataquieR.dt_adjust_default)),
  output_dir = NULL,
  force_overwrite = FALSE
)
}
\arguments{
\item{study_data}{\link{data.frame} the data frame that contains the measurements}

\item{item_level}{\link{data.frame} the data frame that contains metadata
attributes of study data}

\item{label_col}{\link{variable attribute} the name of the column in the metadata
with labels of variables}

\item{meta_data_segment}{\link{data.frame} -- optional: Segment level metadata}

\item{meta_data_dataframe}{\link{data.frame} -- optional: Data frame level
metadata}

\item{meta_data_cross_item}{\link{data.frame} -- optional: Cross-item level
metadata}

\item{meta_data_item_computation}{\link{data.frame} optional. computation rules
for computed variables.}

\item{meta_data}{\link{data.frame} old name for \code{item_level}}

\item{meta_data_v2}{\link{character} path to workbook like metadata file, see
\code{\link{prep_load_workbook_like_file}} for details.
\strong{ALL LOADED DATAFRAMES WILL BE PURGED},
using \code{\link{prep_purge_data_frame_cache}},
if you specify \code{meta_data_v2}.}

\item{...}{arguments to be passed to all called indicator functions if
applicable.}

\item{dimensions}{\link{dimensions} Vector of dimensions to address in the report.
Allowed values in the vector are Completeness, Consistency,
and Accuracy. The generated report will only cover the
listed data quality dimensions. Accuracy is computational
expensive, so this dimension is not enabled by default.
Completeness should be included, if Consistency is
included, and Consistency should be included, if Accuracy
is included to avoid misleading detections of e.g. missing
codes as outliers, please refer to the data quality concept
for more details. Integrity is always included.
If dimensions is equal to NULL or "all", all dimensions
will be covered.}

\item{cores}{\link{integer} number of cpu cores to use or a named list with
arguments for \link[parallelMap:parallelStart]{parallelMap::parallelStart} or NULL,
if parallel has already been started by the caller.
Can also be a cluster.}

\item{ignore_empty_vars}{\link{enum} TRUE | FALSE | auto. See
\link{dataquieR.ignore_empty_vars}.}

\item{specific_args}{\link{list} named list of arguments specifically for one of
the called functions, the of the list elements
correspond to the indicator functions whose calls
should be modified. The elements are lists of
arguments.}

\item{advanced_options}{\link{list} options to set during report computation,
see \code{\link[=options]{options()}}}

\item{author}{\link{character} author for the report documents.}

\item{title}{\link{character} optional argument to specify the title for
the data quality report}

\item{subtitle}{\link{character} optional argument to specify a subtitle for
the data quality report}

\item{user_info}{\link{list} additional info stored with the report, e.g.,
comments, title, ...}

\item{debug_parallel}{\link{logical} print blocks currently evaluated in parallel}

\item{resp_vars}{\link{variable list} the name of the measurement variables
for the report. If missing, all variables
will be used. Only item level indicator
functions are filtered, so far.}

\item{filter_indicator_functions}{\link{character} regular expressions, only
if an indicator function's name
matches one of these, it'll
be used for the report. If
of length zero, no filtering
is performed.}

\item{exclude_indicator_functions}{\link{character} regular expressions,
if an indicator function's name
matches one of these, it'll
be excluded from the report. If
of length zero, no filtering
is performed.}

\item{filter_result_slots}{\link{character} regular expressions, only
if an indicator function's
result's name
matches one of these, it'll
be used for the report. If
of length zero, no filtering
is performed.}

\item{mode}{\link{character} work mode for parallel execution. default is
"default", the values mean:
\itemize{
\item default: use \code{queue} except \code{cores} has been set explicitly
\item futures: use the \code{future} package
\item queue: use a queue as described in the examples
from the \code{callr} package by Csárdi and Chang and start
sub-processes as workers that evaluate the queue.
\item parallel: use the cluster from \code{cores} to evaluate all
calls of indicator functions using the classic
R \code{parallel} back-ends
}}

\item{mode_args}{\link{list} of arguments for the selected \code{mode}. As of writing
this manual, only for the mode \code{queue} the argument
\code{step} is supported, which gives the number of
function calls that are run by one worker at a time.
the default is 15, which gives on most of the tested
systems a good balance between synchronization
overhead and idling workers.}

\item{notes_from_wrapper}{\link{list} a list containing notes about changed labels
by \code{dq_report_by} (otherwise NULL)}

\item{storr_factory}{\link{function} \code{NULL}, or
a function returning a \code{storr} object as
back-end for the report's results. If used with
\code{cores > 1}, the storage must be accessible from all
cores and capable of concurrent writing according
to \code{storr}. Hint: \code{dataquieR} currently only supports
\code{storr::storr_rds()}, officially, while other back-
ends may nevertheless work, yet, they are not tested.}

\item{amend}{\link{logical} if there is already data in.\code{storr_factory},
use it anyways -- unsupported, so far!}

\item{cross_item_level}{\link{data.frame} alias for \code{meta_data_cross_item}}

\item{`cross-item_level`}{\link{data.frame} alias for \code{meta_data_cross_item}}

\item{segment_level}{\link{data.frame} alias for \code{meta_data_segment}}

\item{dataframe_level}{\link{data.frame} alias for \code{meta_data_dataframe}}

\item{item_computation_level}{\link{data.frame} alias for
\code{meta_data_item_computation}}

\item{.internal}{\link{logical} internal use, only.}

\item{checkpoint_resumed}{\link{logical} if using a \code{storr_factory} and the back-
end there is already filled, and if
\code{amend} is missing or set to \code{TRUE},
compute all missing result and add them
to the back-end.}

\item{name_of_study_data}{\link{character} name for study data inside the report,
internal use.}

\item{dt_adjust}{\link{logical} whether to trust data types in the study data. if
\code{TRUE}, data types are checked based on the
metadata and later casted to the declared type.
if your data source is already typed, this can
be turned off to speed up computations.
see \link{dataquieR.dt_adjust}}

\item{output_dir}{\link{character} if \code{output_dir} is not \code{NULL}, also create
\code{HTML} output for the report using
\code{\link[=print.dataquieR_resultset2]{print.dataquieR_resultset2()}}
written to the path \code{output_dir}}

\item{force_overwrite}{\link{logical} force to overwrite \code{output_dir}, even if it
exists}
}
\value{
a \link{dataquieR_resultset2} that can be
\link[=print.dataquieR_resultset2]{printed} creating a \code{HTML}-report.
}
\description{
Generate a full DQ report, v2
}
\details{
See \link{dq_report_by} for a way to generate stratified or splitted reports
easily.
}
\seealso{
\itemize{
\item \link{as.data.frame.dataquieR_resultset}
\item \link{as.list.dataquieR_resultset}
\item \link{print.dataquieR_resultset}
\item \link{summary.dataquieR_resultset}
\item \link{dq_report_by}
}
}
