[英]Knit PDF Output with CAT in R
I am using CAT command in R to get following output.我在 R 中使用 CAT 命令来关注 output。
The Output in knitted PDF file is different to what I get in console.编织的 PDF 文件中的 Output 与我在控制台中得到的不同。 How can I get similar output in PDF as I get in Console?如何在控制台中获得类似 output 中的 PDF?
In PDF Output, the print question and code output is getting intermingled.在 PDF Output 中,打印问题和代码 output 混合在一起。
header <- blue$italic
cat(header("\nAre there any Missing Values ? \n"))
anyNA(cars_df)
cat(header("\nHow many Missing Values are there ? \n"))
sum(is.na(cars_df))
cat(header("\nWhich Variables have got Missing Values ? \n"))
colSums(is.na(cars_df))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.