Skip to content

incorrect parsing of rownames #3

@r2evans

Description

@r2evans

When running ess-R-dv-ctable on R's ubiquitous dataset mtcars, there are two things wrong:

|  |                   mpg|cyl| disp| hp|drat|   wt| qsec|vs am|gear|carb|
+--+----------------------+---+-----+---+----+-----+-----+-----+----+----+
|Ma|zda RX4           21.0|  6|160.0|110|3.90|2.620|16.46| 0  1|   4|   4|
|Ma|zda RX4 Wag       21.0|  6|160.0|110|3.90|2.875|17.02| 0  1|   4|   4|
|Da|tsun 710          22.8|  4|108.0| 93|3.85|2.320|18.61| 1  1|   4|   1|
...
  1. The rownames are incorrectly assumed to be 2 characters (because there are <100 rows, perhaps?). This is directly affecting the first column. This is repeated if we remove the first column (mtcars <- mtcars[,-1]) and its first column cyl is now affected. If we remove the rownames (rownames(mtcars) <- NULL), the problem goes away.
  2. The two columns vs and am do not have a separator pipe | between them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions