pander
pander copied to clipboard
Data frame with non sequential row.names
Not sure if this is a bug but maybe is worth reporting as it may have unintended consequences.
mdf <- data.frame(a=c(1,2,3),b=letters[1:3])
pander(mdf)
# However if mdf row.names is non sequential then the row.names are printed
attributes(mdf)$row.names <- as.integer(c(1,5,8))
pander(mdf)
Yeah, it's on purpose: https://github.com/Rapporter/pander/blob/2c1b47990bff538f1f1e2e7d8fa35bc5cada5940/R/pandoc.R#L1118
But we should indeed document it somewhere, good point!