| umx_strings2numeric | R Documentation |
If you give one column name, the column is converted from string to numeric, and returned as a vector. If multiple column names are given (or cols is not set), each is converted, and an updated data.frame returned.
umx_strings2numeric(df, cols = NA, mapStrings = NULL)
df |
The df |
cols |
(optional) list of columns (default = use all) |
mapStrings |
legal strings which will be mapped in order to numbers. |
df
Other Data Functions:
noNAs(),
prolific_anonymize(),
prolific_check_ID(),
prolific_read_demog(),
umx,
umxFactor(),
umxHetCor(),
umx_as_numeric(),
umx_cont_2_quantiles(),
umx_lower2full(),
umx_make_MR_data(),
umx_make_TwinData(),
umx_make_fake_data(),
umx_make_raw_from_cov(),
umx_merge_randomized_columns(),
umx_polychoric(),
umx_polypairwise(),
umx_polytriowise(),
umx_read_lower(),
umx_rename(),
umx_reorder(),
umx_score_scale(),
umx_select_valid(),
umx_stack()
tmp = data.frame(x=letters)
umx_strings2numeric(tmp, mapStrings = letters)
umx_strings2numeric(tmp, cols= "x", mapStrings = letters)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.