2
我試圖使用RStudio將一些R結果包含在TeX文檔中。我設法讓RStudio生成,對我來說看起來是一個很好的tex文件,但是它不能編譯pdf。Sweat to LaTeX「未定義的控制序列」錯誤
我收到錯誤返回說!未定義的控制順序。 「這似乎是返回由於海峽的第一線(數據)呼叫,線條顯示顯着性水平:
"! Undefined control sequence.
<argument> '
data.frame': 1980 obs. of 5 variables:
l.39 'data.frame': 1980 obs. of 5 variables:
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined."
"! Undefined control sequence. <argument>
Signif. codes: 0 '
***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
l.95 ...**' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined."
文件只彙總(數據),例如做工精細
環顧其他郵件列表等我看到,這可能是因爲tex無法找到Sweave軟件包,因此已將其複製到各個位置(與Rnw和tex文件相同的文件夾,以及路徑中沒有空格的目錄)並嘗試重新運行該文件。似乎沒有任何工作。
同樣,這不起作用,但使用摘要(汽車),而不是str(汽車)。這暗示了它與「角色」的關係。
\documentclass [a4paper]{article}
\usepackage{Sweave}
\title {Sweave Example 1}
\author {Friedrich Leisch}
\begin {document}
\maketitle
In this example we embed parts of the examples from the
\texttt {kruskal.test} help page into a \ LaTeX {} document :
<<>>=
data (cars)
str(cars)
@
\end{document}
(改編自sweave手冊) 什麼林做錯了任何想法?
任何建議將不勝感激。
哇!完美,令人難以置信的簡單!謝謝布萊恩 – user1697590
仍然無法工作,你能幫忙嗎? –
@ArunRaja不是。如果您遇到同樣的問題並且此解決方案無效,則需要創建一個新問題並詳細描述您的問題。此外,鏈接到這個問題,並解釋爲什麼這裏的解決方案不能幫助你(它給出了什麼錯誤)。 –