如何在使用grid.edit时使用knitr隐藏来自块的图形输出?

时间:2019-07-15 23:41:43

标签: r graph knitr

我正在使用R markdown并有一个块要隐藏图形输出,但是knitr选项似乎无法阻止图形显示

代码如下:

import UIKit

class CollectionViewController: UICollectionViewController {

    let columnLayout = ColumnFlowLayout(
        cellsPerRow: 5,
        minimumInteritemSpacing: 10,
        minimumLineSpacing: 10,
        sectionInset: UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
    )

    override func viewDidLoad() {
        super.viewDidLoad()

        title = "Demo"

        collectionView.collectionViewLayout = columnLayout
        collectionView.insetsLayoutMarginsFromSafeArea = false
        collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "Cell")
    }

    override func viewWillLayoutSubviews() {
        let xOrigin = view.readableContentGuide.layoutFrame.origin.x
        collectionView.layoutMargins = UIEdgeInsets(top: 0, left: xOrigin, bottom: 0, right: xOrigin)
    }

    override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return 59
    }

    override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath)
        cell.backgroundColor = UIColor.orange
        return cell
    }

}

显示{r comparing samples, echo=TRUE, fig.keep = 'none', results='hide', tidy=TRUE, tidy.opts=list(width.cutoff=60)} var_comp <- upset(res2,nsets = 6, text.scale = 3, sets.bar.color = nord_palettes$red_mountain[c(1:6)], matrix.color = "darkred", main.bar.color = nord_palettes$frost[4], nintersects = NA) var_comp grid.edit('arrange',name='arrange2') vp5 = grid.grab() 的结果。我认为var_comp可以防止这种情况。我也尝试过fig.keep = 'none' 我只想将代码包含在最终文档中(我在文档的更下方显示了另一个图)。

0 个答案:

没有答案