bridges | R Documentation |
Convert between different classes
l2m(l)
m2l(m)
d2m(d)
m2d(m)
l2a(l)
a2l(a)
a2m(a)
m2a(m)
m2ll(m, index = NULL)
l |
|
m |
|
d |
|
a |
|
index |
|
the data in the required class
a2m
/m2a
change, by essence, the dimension of the data.
m2ll
is used internally to hanle coo and cur in Ldk
objects but may be
useful elsewhere
Other bridges functions:
as_df()
,
complex
,
export()
# matrix/list
wings[1] %>% coo_sample(4) %>%
m2l() %T>% print %>% # matrix to list
l2m() # and back
# data.frame/matrix
wings[1] %>% coo_sample(4) %>%
m2d() %T>% print %>% # matrix to data.frame
d2m # and back
# list/array
wings %>% slice(1:2) %$%
coo %>% l2a %T>% print %>% # list to array
a2l # and back
# array/matrix
wings %>% slice(1:2) %$%
l2a(coo) %>% # and array (from a list)
a2m %T>% print %>% # to matrix
m2a # and back
# m2ll
m2ll(wings[1], c(6, 4, 3, 5)) # grab slices and coordinates
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.