【发布时间】:2021-07-15 18:52:36
【问题描述】:
我想获得一些关于将数据透视表导出为 pdf 文件的提示。 我已经按照http://www.pivottabler.org.uk/ 此处描述的方法进行了操作,但是出现了一条错误消息。 它指的是pdfcrop和ghostscript。
我在论坛上发了很多消息(包括Got knit issue with R)并尝试重新安装Markdown,tinytex没有结果。 由于我没有安装 pdfcrop 和 ghostscrip 的管理员权限,我想寻求帮助以获得替代解决方案.... (Rstudio v1.3) 由于我在复杂数据表,理想情况下我想继续使用打包器,它可以避免我重新开始
谢谢
---
title: "Untitled"
output: pdf_document
header-includes:
-\usepackage{multirow}
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r results='asis', echo=FALSE, comment=""}
pt <- PivotTable$new()
pt$addData(bhmTrains)
pt$addColumnDataGroups("TrainCategory")
pt$addRowDataGroups("TOC", header="Spécialité", addTotal=FALSE)
pt$defineCalculation(calculationName="TOTAL",
summariseExpression="n()")
cat(pt$getLatex(caption="test", label="xxxxx"))
```
我收到以下消息
Error in pt$getLatex : objet de type 'closure' non indiçable
Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> cat
De plus : Warning message:
In has_crop_tools() :
Tool(s) not installed or not in PATH: pdfcrop, ghostscript
-> As a result, figure cropping will be disabled.
【问题讨论】:
标签: r r-markdown markdown pivot-table