为什么knitr不允许方向分配?

时间:2013-12-12 18:17:18

标签: r knitr

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`

0 个答案:

没有答案