View conflict with tibbles
smwrQW::View
interacts poorly with tibbles. I believe this is mainly because of the format
call within smwrQW::View
, which produces a vector that's the same size as a data.frame for base data.frames but differently sized from the original data.frame for tibbles.
For small data.frames, View
merges all columns into one:
library(smwrQW)
A <- tibble::tibble(x=1:3, y=2:4)
View(A)
For large data.frames, when the columns extend beyond some standard width and there are at least two rows, View
gives an error:
long <- "this is a very very very long column entry"
B <- tibble::tibble(x=rep(long, 2), y=long, z=long, a=long, b=long, c=long)
View(B)
## Error in View : 'names' attribute [2] must be the same length as the vector [1]
This issue emerged from https://github.com/USGS-R/loadflex/issues/218#issuecomment-321411664