R允许方向分配,knitr反转方向并响应错误。这是代码:
\documentclass[letter]{article}
\title{y}
\author{z}
\begin{document}
\maketitle
<<assignment, echo = TRUE>>=
(X <- 10)
(10 -> Y)
@
\end{document}
` (X <- 10)
## [1] 10
(10 <- Y)
## Error:
invalid (do set) left-hand side to assignment`