3
如何根據某些條件打開/關閉顯示的特定子部分?例如, 僅當xyplotFacSpecTotVarTest.pdf
存在時,我纔想顯示以下子部分。KnitR,文本和代碼塊的Latex條件顯示
我該怎麼辦?
\subsection{Checksum: Factor, Specific, and Total Variance}
Perhaps the most basic test of a regression model is if the factor and specific variances sum to equal the total variance. Here, we
present this diagnostic as an xy-plot, with the sum of factor and specific variance on the x-axis and the total variance on the y-axis. We
expect the plotted points to line up tightly along the identity line.
\clearpage
\begin{figure}[!h]
\centering
\includegraphics{\Sexpr{image_dir}xyplotFacSpecTotVarTest.pdf}
\caption{Total Variance vs. Sum of Factor and Specific Variance, All Instruments Passing Exposure Model.}
\end{figure}
如何處理「xyplotFacSpecTotVarTest.pdf」不存在的情況。文件從表格中的內容生成,反過來可能有或沒有數據。最終的PDF生成過程錯誤,如果它缺少「xyplotFacSpecTotVarTest.pdf」我如何處理這種情況? – user2120927