'How can you package NodeJS with an R package?

I am wrapping some NodeJS functionality in an R package. I would like that NodeJS is installed for the user as they install the R package. Can you recommend how to do this or in general how to package NodeJS with an R package?

I am wondering if it is possible to run install.nodejs when the package is installing, or if another option is better.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source