在 Windows 上从 vega(node.js 模块)安装 v2png 程序

2023-12-23

The export_png()R ggvis包中的函数需要我们有程序vg2png从 node.js 模块安装vega。 (来源:R 文档 http://www.rdocumentation.org/packages/ggvis/functions/export_png )

我在 Windows 上安装了 Node 和 npm,然后运行npm install vega.

这是我运行时得到的输出npm install vega:

C:\Users\username>npm install -g trifacta/vega
\


> [email protected] /cdn-cgi/l/email-protection install C:\Users\username\AppData\Roaming\npm\node_modules\vega\node_modules\canvas
> node-gyp rebuild

|
C:\Users\username\AppData\Roaming\npm\node_modules\vega\node_modules\canvas>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bi
n\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Node Commands

Syntax:
    node {operator} [options] [arguments]

Parameters:
        /? or /help   - Display this help message.
        list          - List nodes or node history or the cluster
        listcores     - List cores on the cluster
        view          - View properties of a node
        online        - Set nodes or node to online state
        offline       - Set nodes or node to offline state
        pause         - Pause node [deprecated]
        resume        - Resume node [deprecated]

For more information about HPC command-line tools,
see http://go.microsoft.com/fwlink/?LinkId=120724.
C:\Users\username\AppData\Roaming\npm\vg2svg -> C:\Users\username\AppData\Roaming\npm\node_modules\vega\bin\vg2svg
C:\Users\username\AppData\Roaming\npm\vg2png -> C:\Users\username\AppData\Roaming\npm\node_modules\vega\bin\vg2png
[email protected] /cdn-cgi/l/email-protection C:\Users\username\AppData\Roaming\npm\node_modules\vega
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection)
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection)
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, tunnel-agen
[email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection
0.1, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection)
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection)
└── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection)

我不确定它是否安装正确。现在,当我跑步时:

mtcars %>% 
  ggvis(x = ~wt) %>% 
  export_png()

我收到以下错误:

写入文件plot.png

vega_file(vis, file = file, type = "png") 中的错误:

未找到转换程序 vg2png。

是否有在 Windows 上安装 vega 的特定方法可以解决此错误?


None

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 Windows 上从 vega(node.js 模块)安装 v2png 程序 的相关文章

  • Nodemailer发送日历事件并将其添加到谷歌日历

    我正在尝试使用 nodemailer 将日历事件发送到 Gmail 帐户 这是我的代码 let transporter nodemailer createTransport host smtp gmail com port 587 secu
  • 在 Lavaan 生长曲线模型中提取个体轨迹

    我已经使用 R 的 Lavaan 包中的 Growth 函数成功地对一项研究的纵向数据进行了建模 我找不到任何关于如何提取每个参与者的预测轨迹的记录 我只能找到整个组的预测轨迹 在摘要输出的 拦截 部分下给出 使用 lavPredict m
  • 通过 r markdown 中的循环创建代码片段

    如同如何使用R中的knitr创建一个包含代码块和文本的循环 https stackoverflow com questions 36373630 how to create a loop that includes both a code
  • Node 不断恢复到旧版本

    每次我在控制台中重新启动 vagrant 时 它都会询问我的登录详细信息 然后说Now using node v7 10 0 npm v4 2 0 当我做run nvm install node I get v13 11 0 is alre
  • R data.table fwrite 到 fread 空间分隔符并清空

    我在使用 fread 以 作为分隔符和散布的空白值时遇到问题 例如 这个 dt lt data table 1 5 1 5 1 5 make a simple table dt 3 V2 NA add a blank in the midd
  • R data.table 1.9.2 关于 setkey 的问题

    这似乎是 1 8 10 后引入的一个错误 与包含列表的 DT 的 setkey 相关 运行下面两个代码来查看问题 library data table dtl lt list dtl 1 lt data table scenario 1 p
  • Socket.io 400(错误请求)

    我的服务器上有这段代码 var express require express var routes require routes var user require routes user var http require http var
  • 汇总表中各列的字符值比例

    在这种数据框中 df lt data frame w1 c A A B C A w2 c C A A C C w3 c C A B C B 我需要计算所有列中字符值的列内比例 有趣的是 以下代码适用于大型实际数据集 但对上述玩具数据会引发错
  • 简单 AJAX Get 请求“待处理”

    我正在尝试实现一个简单的 AJAX GET 请求 该请求告诉服务器删除数据库中的文档 虽然我从服务器得到文档已删除的确认 但 Chrome 检查器显示该请求处于 待处理 状态 最终导致服务器错误 我做错了什么 HTML div class
  • node.js通过aws-sdk模块重命名s3对象

    是否可以通过重命名 s3 上的对象aws sdk https www npmjs com package aws sdk 我找不到解决方法 也许有一个临时解决方案 我想我会回答 因为没有人回答过 这个应该有用 create a new s3
  • Node.js 中的 PHP exit()/die() 等价物是什么

    什么是 PHP die http www php net manual de function die php http www php net manual de function die php 在 Node js 中等效吗 https
  • 未捕获的 ReferenceError:未定义角度 - Mean.IO

    我已遵循安装步骤 http mean io docsmean io 但是当我浏览 localhost 3000 时 我得到一个空白页面 当我打开控制台时 我得到一个指向相同错误的文件列表 未捕获的引用错误 角度未定义 我的问题是类似的to
  • 使用 pkg:sjPlot 函数创建一个生成部分斜体单元格的数据框

    我正在尝试创建一个简单的数据表 其中 Coral taxon 列中的属名称为斜体 而 spp 列中的属名称为斜体 属名后面的部分不大写 我尝试使用 expression 函数对 Coral taxon 的每一行进行编码 但没有成功 sum
  • 如何将同一行中以逗号分隔的值拆分到R中的不同行

    我有一些数据来自谷歌表格 https forms gle rGQQL3tvA1PrE4dD8我想拆分以逗号分隔的答案 and 复制参与者的 ID 数据如下 gt head data names Q2 Q3 Q4 1 PART 1 fruit
  • R中整数类和数字类有什么区别

    我想先说我是一个绝对的编程初学者 所以请原谅这个问题是多么基本 我试图更好地理解 R 中的 原子 类 也许这适用于一般编程中的类 我理解字符 逻辑和复杂数据类之间的区别 但我正在努力寻找数字类和整数类之间的根本区别 假设我有一个简单的向量x
  • 如何在 R 中将字符串解析为层次结构或树

    有没有办法将表示组的字符串解析为 R 中的层次结构 假设我的小组结构如下 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 3 1 1 3 1 1 1 3 2 1 1 3 3 1 2 1 2 1 1 2 1 1 1 2 1 2 1
  • GraphQL 预期可迭代,但未找到字段 xxx.yyy 的迭代

    我目前正在尝试使用 NodeJS 进行 GraphQL 但我不知道为什么以下查询会出现此错误 library name user name email 我不确定是否type of my resolveLibrary是对的 因为在任何例子中我
  • 读取R中打开的Excel文件

    有没有办法将打开的Excel文件读入R 当Excel中打开一个excel文件时 Excel会对文件加锁 比如R中的read方法无法访问该文件 你能绕过这个锁吗 Thanks 编辑 这发生在带有原始 Excel 的 Windows 下 发生错
  • 尝试在 React 应用程序中连接到 MySQL 数据库时,无法读取未定义的属性(读取“查询”)错误

    我正在尝试连接到 MySQL 数据库并在单击按钮后在 React 应用程序中运行查询 一些它如何给出错误 我当前的代码如下所示 import mysql from mysql function App async function sync
  • Node.js - 重载函数

    有没有一种方法可以重载node js中的函数 类似于 noSuchMethod https developer mozilla org en JavaScript Reference Global Objects Object noSuch

随机推荐