| mkt1 | R Documentation |
Make tibble from one vector x. The vector is re-organised in a data frame with column 1 for group label and column 2 for observations.
mkt1(x, name = c("obs", "gr"))
x |
A vector. |
gr_names |
The name of the first column - default "gr" for groups. |
obs_names |
The name of the second column - default "obs" for observations. |
A tibble - see details in tibble.
# Generate one vector
g1 <- rnorm(10)
# Make tibble using default parameters
df <- mkt1(g1)
# Make tibble using custom parameters
df <- mkt1(g1, gr_names = "groups", obs_names = "values", group_label =
"group1")
# For instance, vector x:
x <- c(1, 2, 3, 4, 5)
df <- mkt1(x)
# become a tibble: 5 × 2:
gr obs
<fctr> <dbl>
1 Group1 1
2 Group1 2
3 Group1 3
4 Group1 4
5 Group1 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.