This function sends any image/photo from your computer to your phone. This function assumes you have added a bot from Telegram on your phone, noted the Token and added it to the Add_Bot(Token) file. You should have received a confirmation sms after doing this successfully. See ?Add_Bot for information on this. Alternatively, you could simply include your Token and ID as arguments below, but the Add_Bot function will make managing sending messages much simpler. The default location for the bot's saved information is: path.expand("~") (Type this in your console to see the location). If you overrode this, add the Bot's name and the location in the parameters below. Otherwise, add the Token and ID below.

Pic_Bot(Img_Loc, Caption = "", Bot_Name = NULL, Info_Loc = NULL,
  Token = NULL, Silent = TRUE)

Arguments

Img_Loc

Image to send to your phone from R (e.g. a png file).

Caption

Caption to your image. Defaults to none.

Bot_Name

Name of the bot to do the sending.

Info_Loc

Where the RDS file with your needed bot info is saved. Defaults to path.expand("~")

Token

Token of your bot if not using the saved file call from Rbot::Add_Bot()

Silent

Choose to not print successful execution. Defaults to TRUE.

Value

Bot Document sent

Examples

# NOT RUN {
png('test.png')
plot(rnorm(100))
dev.off()
Img_Loc = 'test.png'
Bot_Name <- "Soldier1"
Pic_Bot(Img_Loc = Img_Loc, Bot_Name = Bot_Name) # assume default location
# }