【文件属性】:
文件名称:nofrills:低成本匿名函数
文件大小:78KB
文件格式:ZIP
更新时间:2021-05-29 15:12:29
r lambda-functions anonymous-functions currying partial-functions
除非您需要curry()或curry_fn() ,否则您应该使用更通用的包,其中包括fn() 。
没有多余的装饰
低成本匿名函数
概述
nofrills是一个轻量级的 R 包,它提供了fn() ,这是function()一个更强大的变体,它:
成本更低— 启用 tidyverse 准因此您无需为付出代价
具有相同的品味- 支持function()的语法和功能的超集
填充较少——
fn( x , y = 1 ~ x + y )
相当于
function ( x , y = 1 ) x + y
安装
install.packages( " nofrills " )
或者,从 GitHub 安装开发版本:
# install.packages("devtools")
devtools :: install_github( " egnha/nofrills " )
用法
与func
【文件预览】:
nofrills-0.3.1
----man()
--------curry.Rd(2KB)
--------fn.Rd(6KB)
--------make_fn_aware.Rd(1KB)
--------as_fn.Rd(2KB)
--------nofrills-package.Rd(642B)
----.gitignore(46B)
----README.md(6KB)
----.Rbuildignore(140B)
----cran-comments.md(831B)
----tests()
--------testthat.R(60B)
--------testthat()
----LICENSE(39B)
----DESCRIPTION(752B)
----inst()
--------logo.png(49KB)
----R()
--------exprs.R(562B)
--------as-fn.R(2KB)
--------make-fn-aware.R(2KB)
--------curry.R(3KB)
--------closure.R(2KB)
--------fn.R(8KB)
--------nofrills.R(50B)
----codecov.yml(14B)
----LICENSE.md(1KB)
----NEWS(2KB)
----.travis.yml(162B)
----nofrills.Rproj(372B)
----NAMESPACE(138B)
----README.Rmd(5KB)