编程不只是工作 -- R语言的赞美包

编程不只是工作 – R语言的赞美包

在R语言中有这么一个包,叫做“praise”

# 安装
install.packages("praise")
#加载
library(praise)

在安装加载之后,只要调用一下函数 praise(),他就会开始赞美你,而且还会变着花样称赞你

 praise()
[1] "You are well-made!"

 praise()
[1] "You are excellent!"

praise()
[1] "You are magnificent!"

当然,你也可以指定它换种方式称赞你,目前,它支持以下这些词性,你可以随意组合

 names(praise_parts)
[1] "adjective"     "adverb"        "adverb_manner"
[4] "created"       "creating"      "exclamation"  
[7] "rpackage"

比如这样

praise("${EXCLAMATION}! You have done this ${adverb_manner}!")
[1] "YEAH! You have done this seriously!"

这样

praise("${EXCLAMATION}! the ${rpackage} is ${adjective}")
[1] "HMM! the project is shining"

··· ···
生活中也一样,有些东西并不能够带给我们实质性的收益,但是却可以为我们带来些许乐趣,生活也不全是工作。 祝你开心 ^-^

猜你喜欢

转载自blog.csdn.net/k_wzzc/article/details/83447952