我有iris数据框。我想添加列“log_Sepal.Length”和“log_Sepal.Width”,它们是将日志应用到“Sepal.Length”和“Sepal.Width”的结果。我试过:
iris %>%
mutate_at(.vars = vars(names(.)[str_detect(names(.), "Sepal")] ), .funs = c("identity", "log"))
Run Code Online (Sandbox Code Playgroud)
但我想要的数据框是:
iris$log_Sepal.Length <- log(iris$Sepal.Length)
iris$log_Sepal.Width <- log(iris$Sepal.Width)
iris
Run Code Online (Sandbox Code Playgroud)
这可能吗mutate_at?
我从 Rmarkdown 开始,我想个性化我的 html 文档。我想在文档的右上角放置一个徽标。
谢谢!
我在before_body 中使用了includes 选项,但它将徽标放在左角。我怎么能把这个标志放在右上角?
输出:
html_document:
includes:
before_body: Logo.html
Run Code Online (Sandbox Code Playgroud)