Following the python module py3minepi, this is an R package that allows connection to the Minecraft API using RaspberryJuice and either Spigot or Minecraft:Pi.
The miner package provides a few simple functions to manipulate the Minecraft world from R. The intent of this package is to encourage new R users to learn R by writing scripts to do fun things in Minecraft.
See the online book, R Programming with Minecraft, for details on setting up a Minecraft server and using this package, and for a variety of detailed examples. The package also contains a short vignette on its basic use.
Here are a few of the things you can do with miner:
Or the R logo:
This player is operated by a bot trying to find its way out of the maze via a rule-based algorithm:
Freeze water as you run over it
or create towers of ice with a gesture:
The craft package includes additional functions that illustrate and extend the use of miner. Contributors who want to extend the functionality of miner should submit a pull request to the craft package.
Install the miner and craft packages from R universe:
install.packages(c("miner", "craft"), repos=c("https://kbroman.r-universe.dev", "https://cloud.r-project.org"))Alternatively, use the remotes package to install them from GitHub:
# install.packages("remotes")
library(remotes)
install_github("kbroman/miner", build_vignettes=TRUE)
install_github("kbroman/craft", build_vignettes=TRUE)Note: this should automatically install a number of dependent
packages, including Rmaze,
igraph, and
imager. To install imager you may
need to install Xquartz on Mac or
libx11-dev or similar on Linux.
You'll need a Minecraft server that is running the RaspberryJuice plugin. See the Installation and configuration section of R Programming with Minecraft.
R Programming with Minecraft is a bookdown book about R and Minecraft, and particularly about using Minecraft with the miner package. Contributors who want to add documentation should submit a pull request to the miner_book repository on Github.
This package was created as part of the ROpenSci unconference in May, 2017 by:
Licensed under the MIT license. (More information here.)










