Description Usage Arguments Value Author(s) See Also Examples
The function returns a character vector of element abbreviations if the input object contained variables with element abbreviations. Input may be data.frame, matrix, character vector or named numeric. There are two options to use this functions:
A) only one object
B) with two objects
For A) the function checks for the pattern of element abbreviations, e.g. Al, S, Ca, etc. For B) the function checks for element abbreviations which are present in both objects. E.g. if x = c("Al", "Ba", "Ca") and y = c("Ba", "K", "Th") the return value will be "Ba". The resulting character vector is without duplicated entries, e.g. x = c("N", "P", "S", "S") results into c("N", "P", "S").
1 | select.VarsElements(x, y, invert = FALSE)
|
x |
data.frame, character vector or named numeric containing element abbreviations as variables |
y |
optional, data.frame, character vector or named numeric containing element abbreviations as variables |
invert |
logical. If TRUE return variable names that do not match an element abbreviation pattern |
character vector of element abbreviations
Solveig Pospiech
Other sub functions: check_readline
,
relError_dataset
1 2 3 4 5 6 7 | x = c("Al", "Ba", "Ca")
y = c("Ba", "K", "Th")
select.VarsElements(x, y)
myvector = c("Al", "Location", "Date", "S", "Ba", "OH")
select.VarsElements(myvector)
select.VarsElements(myvector, invert = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.