我对 R 比较陌生,所以希望这是一个简单的解决方法。
这是我的问题:
x <- data.frame(c("Thing1", "Thing2", "Thing3", "Thing4", "Thing5"), c("Sizeable line of text", "more text", "I hope this aligns", "something", "help me"))
colnames(x) <- c("T", "Text")
format(x, justify = "left")
T Text
1 Thing1 Sizeable line of text
2 Thing2 more text
3 Thing3 I hope this aligns
4 Thing4 not much
5 Thing5 help me
如何让列名与数据框的其余部分左对齐?
提前致谢。