I have a tibble like this
dataf <- as_tibble( matrix(rnorm(12,0,1),nrow=4,ncol=3))
Its dimension is 4-by-3
I created a new column, which itself is a matrix:
dataf <- dataf %>% mutate(A = matrix(rnorm(8,0,1),nrow=4,ncol=2))
Though A is a 4-by-2 matrix, but the dimension of dataf is 4-by-4.
I hope
dataf %>% select(A)
returns a 4-by-2 tibble, so that I can set names for each column. However, this command still returns a 4-by-1 tibble.
So my question is how this select function can return a 4-by-2 tibble? Thanks!