view_group
display the range/elements of each column for selected group
view_group(dat, g_vec, t_vec = NULL)
a dataframe, preferably the wide format
grouping vector, contain column names for grouping
target vector, contain column names for examining the range and elements.
a data table with range/elements of each column
view_group(iris,c("Species"),c("Sepal.Length","Petal.Length"))
#> Species Sepal.Length Petal.Length
#> 1 1, 4.3~5.8 1~1.9
#> 2 2, 4.9~7 3~5.1
#> 3 3, 4.9~7.9 4.5~6.9
view_group(iris,c("Species"))
#> Species Sepal.Length Sepal.Width Petal.Length Petal.Width
#> 1 1, 4.3~5.8 2.3~4.4 1~1.9 0.1~0.6
#> 2 2, 4.9~7 2~3.4 3~5.1 1~1.8
#> 3 3, 4.9~7.9 2.2~3.8 4.5~6.9 1.4~2.5