小编use*_*624的帖子

在markdown中更改文档标题和作者姓名的字体

我正在使用rmarkdown生成一个pdf文档,转换在RStudio中完成,或者使用render()R中的函数.任何人都可以给我一些指针来改变文档标题和作者名称所用字体的大小,颜色等吗?通过编辑文档中的前端内容,我在改变整体字体等方面取得了很大的进步,但我完全迷失在这一点上.请记住,我不会说LaTeX很好......

谢谢你的帮助

latex r-markdown

5
推荐指数
1
解决办法
1899
查看次数

如何更改ggplot2中一个面的宽度

我有一个多面条形图,其中一个组的成员少于其他组。我可以仅使用设置中存在的组来绘制它scales = "free_x",但刻面与其他刻面的宽度相同,因此条形更宽。这很分散注意力,我认为我无法按原样提交该数字以供出版。我知道 ggplot2 中的分面函数曾经允许您调整各个分面的宽度,但现在似乎不再是这种情况了。

这是一个例子。我想让右手刻面变窄,以便条形与其他条形宽度相同。非常感谢任何帮助。

response<-rnorm(42, mean=10)
factor1<-factor(rep(c("A","B","C"), each=14))
factor2<-factor(rep(c(1,2,3,1,2,3,1,2,3,1,2,3,1,2), times=3))
factor3<-factor(rep(c("X","X","X","Y","Y","Y","X","X","X","Y","Y","Y","Y","Y"),times=3))
factor4<-factor(rep(c(rep(c("27 degrees","30 degrees"), each=6),"33 degrees","33 degrees"), times=3))

data1<-data.frame(response,factor1,factor2,factor3,factor4)


p1<- ggplot(data=data1, aes(x=factor2, y=response, fill=factor1))
p1<- p1+geom_bar(stat="identity")
p1<- p1+facet_grid(~factor4+factor3,scales = "free_x")+theme_bw()
p1<- p1+scale_y_continuous(expand = c(0,0))+theme(strip.background=element_rect( fill="white"))
p1<- p1 + scale_fill_brewer(guide = guide_legend(reverse=TRUE))
p1
Run Code Online (Sandbox Code Playgroud)

这给出:

在此输入图像描述

r ggplot2

5
推荐指数
0
解决办法
2440
查看次数

无法使用自定义样式编织为pdf

尝试使用自定义mystyles.sty文件从RStudio编织为pdf.这曾经工作正常,但现在我已升级到RStudio 1.044我得到一个错误.

例:

---
title: "Test"
output:
  pdf_document:
    includes:
      in_header: mystyles.sty
---



## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for             authoring HTML, PDF, and MS Word documents. For more details on using R Markdown     see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk …
Run Code Online (Sandbox Code Playgroud)

latex pandoc rstudio r-markdown

4
推荐指数
1
解决办法
453
查看次数

标签 统计

latex ×2

r-markdown ×2

ggplot2 ×1

pandoc ×1

r ×1

rstudio ×1