Skip to content
This repository was archived by the owner on Oct 13, 2022. It is now read-only.
This repository was archived by the owner on Oct 13, 2022. It is now read-only.

View conflict with tibbles #33

@aappling-usgs

Description

@aappling-usgs

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)

image

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 DOI-USGS/loadflex#218 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions