Skip to contents

dm_extract() extracts and (optionally) loads the remote database housing the MLinHCT into the current R session. Unless .legacy = TRUE, column and table names are standardized during extraction, but no other operations are performed. When .legacy = TRUE, the legacy version of dm_extract() is used; see details for this behavior. Note that legacy behavior will be deprecated and eventually removed in future releases, so it is strongly recommended that any new code use .legacy = FALSE.

Usage

dm_extract(
  dm_remote = dm_sql_server(),
  ...,
  .collect = TRUE,
  .legacy = FALSE,
  .reset = FALSE,
  .excl_dsmb = FALSE,
  .quiet = FALSE,
  reset = .reset
)

Arguments

dm_remote

[dm] A dm object connected to the remote SQL server database

...

Names of tables to select; if provided, only these tables will be extracted

.collect

[lgl] Indicates whether the extracted data should be loaded onto the local machine (TRUE by default)

.legacy

[lgl] Should the legacy version of dm_extract() be used? Will be deprecated in a future release, along with .reset.

.reset

[lgl] Should the legacy cache be forced to reset? Only applicable if .legacy = TRUE; ignored otherwise. Will be deprecated in a future release, along with .legacy.

.excl_dsmb

[lgl] [Deprecated] This information is no longer available in the remote database.

.quiet

Should status messages be suppressed?

reset

[lgl] [Deprecated] Please use .reset instead. Current behavior will only consider this argument if .reset is unchanged from the default.

Value

[dm] A dm object with all tables and columns extracted from the remote source.

Details

Legacy behavior is more opinionated than the current version of dm_extract(). First, only a subset of tables and columns are extracted. Second, HLA tables and Cerner tables are combined into a single HLA table and a single Cerner table. Third, some column standardization occurs (though it is limited to simple as() transformations, trimws(toupper(x)) on character variables, and replacement of implicit missing values with explicit NAs.) Finally, some filtering of "uninformative" observations may occur. In the current pipeline, these changes are deferred to later steps to give more control to the user.