Description Usage Arguments Value See Also Examples
View source: R/check-col-names.R
Check column names against their corresponding template
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | check_col_names(
data,
template,
success_msg = NULL,
fail_msg = NULL,
behavior = NULL
)
check_cols_manifest(
data,
id,
success_msg = "All manifest columns present",
fail_msg = "Missing columns in the manifest",
...
)
check_cols_individual(
data,
id,
success_msg = "All individual metadata columns present",
fail_msg = "Missing columns in the individual metadata file",
...
)
check_cols_assay(
data,
id,
success_msg = "All assay metadata columns present",
fail_msg = "Missing columns in the assay metadata file",
...
)
check_cols_biospecimen(
data,
id,
success_msg = "All biospecimen columns present",
fail_msg = "Missing columns in the biospecimen metadata file",
...
)
|
data |
Data frame to check against template (manifest, individual metadata, or assay metadata) |
template |
Character vector of column names from the template to check against |
success_msg |
Message indicating the check succeeded. |
fail_msg |
Message indicating the check failed. |
behavior |
The intended behavior of the test |
id |
Synapse ID of the template to check against |
... |
Additional arguments passed to syn$get() |
A condition object indicating whether the required columns were
present ("check_pass"
) or absent ("check_fail"
).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | template <- c("individualID", "specimenID", "assay")
dat <- data.frame(individualID = c("a", "b"), specimenID = c("a1", "b1"))
check_col_names(dat, template)
## Not run:
syn <- synapse$Synapse()
syn$login()
a <- data.frame(path = "/path/file.txt", parent = "syn123", assay = "rnaSeq")
check_cols_manifest(a, syn)
b <- data.frame(assay = "rnaSeq")
check_cols_manifest(b, syn)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.