mc_Reval: Evaluate R within Minecraft

Description Usage Arguments Details Value Examples

View source: R/mc_Reval.R

Description

Look for chat messages that start with "R " and then evaluate the rest as an R expression.

Usage

1
mc_Reval(player_id = NULL, delay = 1)

Arguments

player_id

Player's entity ID

delay

Delay (in seconds) between checks of the chat messages

Details

The function looks at chat messages in Minecraft. For messages that begin "R ", the rest of the message is treated as an R expression and is evaluated.

The default is to evaluate any such R code. If player_id is specified, only messages from that player are considered.

Use extreme caution with this; if you don't specify player_id correctly, you could be letting others execute code on your computer and so giving them the opportunity to do bad things.

Value

None.

Examples

1
2
3
4
## Not run: 
# runs in an infinite loop; use ctrl-c to stop
mc_Reval(212)
## End(Not run)

ropenscilabs/miner.extra documentation built on Dec. 20, 2020, 1:25 p.m.