write_fwf | R Documentation |
https://gist.github.com/haozhu233/28d1309b58431f4929f78243054f1f58
write_fwf(dt, width, con = stdout(), align = "l", na = "NA", col.names = TRUE)
dt |
The data to be printed |
width |
Either a single number or a vector of widths |
con |
Connection, as in |
align |
"l", "r" or something like "lrl" for left, right, left. |
na |
What to print in places of missing values; default: "NA" |
col.names |
Print column names? Default: TRUE |
dt <- data.frame(a = 1:3, b = NA, c = c('a', 'b', 'c'))
write_fwf(dt, width = c(4, 4, 3))
write_fwf(dt, 5)
X <- matrix(LETTERS[1:9], 3, 3, dimnames=list(1:3, paste0('V', 1:3)))
write_fwf(X, 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.