Package 'noder'

Title: NodeJS for R
Description: Self-contained node JS for R.
Authors: Ben Raymond [aut, cre], Adrien Ickowicz [aut]
Maintainer: Ben Raymond <[email protected]>
License: MIT + file LICENSE
Version: 0.0.5
Built: 2024-10-14 03:00:52 UTC
Source: https://github.com/scienceuntangled/noder

Help Index


noder

Description

Self-contained node JS for R.


Add the path to node/npm to the system path

Description

If npm can already be seen by the system, the system path will not be changed. Otherwise, the system path will be prepended with the node/npm path.

Usage

nr_add_node_path()

Value

TRUE on success, invisibly


Execute node commands

Description

These functions call sys::exec_wait(), sys::exec_background(), or sys::exec_internal(), using the noder-installed node executable as the cmd argument.

Usage

nr_exec_wait(...)

nr_exec_internal(...)

nr_exec_background(...)

Arguments

...

: as for sys::exec_wait(), sys::exec_background(), sys::exec_internal()

Value

As for sys::exec_wait(), sys::exec_background(), sys::exec_internal()

Examples

nr_exec_wait("--version")

Install nodeJS

Description

This is a helper function to install node. The node binaries will be downloaded from https://nodejs.org/en/download/ and saved to your user appdata directory.

Usage

nr_install_node(version = "LTS", bits, force = FALSE)

Arguments

version

string: "LTS" (long-term support, recommended) or "current"

bits

integer: 32 or 64, for 32- or 64-bit install. If missing or NULL, will be guessed based on .Machine$sizeof.pointer

force

logical: force reinstallation if node already exists

Value

the path to the installed executable

References

https://nodejs.org/en/download/

Examples

## Not run: 
  nr_install_node()

## End(Not run)

The path to the node executable

Description

The path to the node executable

Usage

nr_node_exe()

Value

The path to the executable, or NULL if not found

Examples

nr_node_exe()