I like to use ascii output of my results.
There is always an extra 'h' in the header of my table which I and up removing manually.
I can not not figure out how to fix it in my code. See the code and result. E.g., how many cars have how many cilinders.
data(mtcars)
library(ascii)
ascii(as.data.frame(table(mtcars$cyl)),include.rownames=F,format='nice')
|================
h| Var1 h| Freq
| 4 | 11
| 6 | 7
| 8 | 14
|================
I would like to remove the extra h characters from the header. so that the output looks like this:
|================
| Var1 | Freq
| 4 | 11
| 6 | 7
| 8 | 14
|================
Is it a bug in ascii library or in my code? I want to do it via correct params of the ascii call rather then post processing the output, but would consider any "fix" if the proper solution is not possible.
tab <- ascii(your_stuff)thenprint(tab, type = "org")gives you something. I can't find the full list of types and I stumbled upon that in the examples for ascii.asciiit looks likeascii(table(etc...))should be sufficient. Have you tried that, in case it'sas.data.framewhich is sending some control character toasciiwhich is being misinterpreted?