function在R语言
时间: 2023-11-05 09:04:49 浏览: 83
function在R语言中用于创建函数。函数是一组语句的组合,用于执行特定的任务。在R中,函数是对象,可以通过关键字function来定义。函数定义的基本语法是: function_name <- function(arg_1, arg_2, ...) { Function body }。其中,function_name是函数的名称,arg_1, arg_2, ...是函数的参数,Function body是函数的具体实现代码。通过函数,可以将控制权传递给函数,以便将参数传递给函数进行操作,并将结果返回给解释器或存储在其他对象中。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [R语言开发之函数的使用技巧](https://blog.csdn.net/luyaran/article/details/82691388)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [R语言笔记7:functions——编写函数所需的基础知识](https://blog.csdn.net/qy_microbiota/article/details/79639208)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文