Description Usage Arguments Value Examples
View source: R/convert_space.R
Re-express a given vector space in a target space
1 | convert_space(df_given, df_target, ktol = 1e+06)
|
df_given |
full rank matrix (thin or square) |
df_target |
full rank matrix (thin or square) |
ktol |
condition number stopping tolerance |
square coefficient matrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | df_given <-
tribble(
~out_name, ~W1, ~W2,
"X1", 1, -1,
"X2", 1, 0,
"X3", 0, 1
)
df_target <-
tribble(
~out_name, ~V1, ~V2,
"X1", 1, 0,
"X2", 1, 1,
"X3", 0, 1
)
df_V2W <- convert_space(df_given, df_target)
df_t <- matched_inner(df_target, transpose(df_V2W)) %>%
mutate(out_name = df_target %>% names() %>% setdiff(., "out_name"))
transpose(df_t)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.