根据项目特定设置功能默认值R [英] Setting Function Defaults R on a Project Specific Basis

查看:81
本文介绍了根据项目特定设置功能默认值R的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很常见,我使用相同的功能设置。我想知道是否有一种方法,除了在路径上有一个新对象(本质上是该函数的包装器)以外,还可以设置默认参数。例如:

Commonly, I use the same function settings. I'm wondering if there is a method, other than having a new object in the path that is essentially a wrapper for the function, to set default arguments. For example:

paste()是否具有 sep 参数设置为空格 = ,我已经厌倦了反复编写,sep = 。那么有没有办法用我选择的默认值临时替换功能?

paste() has it's sep argument set to a space =" ", I'm tired of writing ,sep="" over and over. So is there a way to "temporarily" replace the function with my chosen defaults?

paste(...,sep="") 

我可以通过包装吗?我有时注意到,某些程序包迫使其他同名函数在全局环境中被屏蔽。

Can I accomplish this through packaging? I've sometimes noticed that, some packages force other equally named functions to be masked in the global environment.

理想情况下,我希望可以在( load.r 或其他一些这样的工作流起点)

Ideally, I'd like something that can be set on a project by project basis in (load.r or some other such workflow startpoint)

推荐答案

默认值软件包; 2014年退休。

The Defaults package used to do that; retired in 2014.

这篇关于根据项目特定设置功能默认值R的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆