我正在使用pgfsweave与Lyx 1.6.8和xtable.提供表格标题
<<result=tex>>=
print(xtable(<dataframe>,caption="Here is my caption"))
@.
Run Code Online (Sandbox Code Playgroud)
如何在表格标题中插入标签,我可以在lyx>插入>交叉引用菜单的文本中进行交叉引用?
我试图插入>浮>表和插入
print(xtable(<dataframe>,floating=FALSE))并
"Here is my caption"在表标题内框架但是这导致(字面意思):
[?oat Table:
<...Table ...>
[Table 2: "Here is my caption" ] ]
Run Code Online (Sandbox Code Playgroud)
甚至是赤脚的交叉引用解决方法
<<result=tex>>=
print(xtable(<dataframe>,caption="Here is my caption",label = "tab:one"))
@
Run Code Online (Sandbox Code Playgroud)
来自ERT-box会有所帮助.
我在 *.Rnw.log 中遇到以下错误:
Error: chunk 3 (label=printgraph)
Error in grid.Call.graphics("L_text", as.graphicsAnnot(x$label), x$x, :
Metric information not available for this family/device
Run Code Online (Sandbox Code Playgroud)
仅在 Lyx 中并取决于声明
+ scale_y_log10(ylim=c(0.025,5))
Run Code Online (Sandbox Code Playgroud)
在以下示例代码中:
<<Code, tidy=T, sanitize=TRUE>>=
require(ggplot2)
df.qdf=data.frame(T = c(0 ,1,2 ,0 ,1.5,2.5)
,q.500 = c(0.025,2,1 ,0.025, 4,2 )
,q.025 = 0.5*c(0.025,2,1 ,0.025, 4,2 )
,q.975 = 1.5*c(0.025,2,1 ,0.025, 4,2 )
,Occasion = c( 1,1,1 ,2 , 2,2 )
)
theme_set(theme_bw())
Graph=(qplot(T,q.500,data=df.qdf)
+geom_smooth(aes(ymin=q.025,ymax=q.975)
,data=df.qdf
,stat='identity'
,fill='blue')
+ylab('Response')
+xlab('Time [h]')
+facet_grid(facet=.~Occasion)
) +scale_y_log10(ylim=c(0.025,5))
@
<<printgraph,echo=FALSE,fig=TRUE,width=10,height=7,sanitize=TRUE>>=
print(Graph)
@
Run Code Online (Sandbox Code Playgroud)
在下面 …