您好,欢迎光临本网站![请登录][注册会员]  
文件名称: R Packages
  所属分类: 讲义
  开发工具:
  文件大小: 4mb
  下载次数: 0
  上传时间: 2016-10-21
  提 供 者: u0145*****
 详细说明: R语言了解各种R包 This book will guide you from being a user of R packages to being a creator of R packages. In Chapter 1, Introduction, you’ll learn why mastering this skill is so important, and why it’s easier than you think. Next, you’ll learn about the basic structu re of a package, and the forms it can take, in Chapter 2, Package Structure. The subsequent chapters go into more detail about each component. They’re roughly organized in order of importance: Chapter 3, R code The most important directory is R/, where your R code lives. A package with just this directory is still a useful package. (And indeed, if you stop reading the book after this chapter, you’ll have still learned some useful new skills.) Chapter 4, Package Metadata The DESCRIPTION lets you describe what your package needs to work. If you’re sharing your package, you’ll also use the DESCRIPTION to describe what it does, who can use it (the license), and who to contact if things go wrong. Chapter 5, Object Documentation If you want other people (including “future you”!) to understand how to use the functions in your package, you’ll need to document them. I’ll show you how to use roxygen2 to document your functions. I recommend roxygen2 because it lets you write code and documentation together while continuing to produce R’s standard documentation format. Chapter 6, Vignettes: Long-Form Documentation Function documentation describes the nitpicky details of every function in your package. Vignettes give the big picture. They’re long-form documents that show how to combine multiple parts of your package to solve real problems. I’ll show you how to use Rmarkdown and knitr to create vignettes with a minimum of fuss. Chapter 7, Testing To ensure your package works as designed (and continues to work as you make changes), it’s essential to write unit tests that define correct behavior, and alert you when functions break. In this chapter, I’ll teach you how to use the testthat package to convert the informal interactive tests that you’re already doing to formal, automated tests. Chapter 8, Namespace To play nicely with others, your package needs to define what functions it makes available to other packages and what functions it requires from other packages. This is the job of the NAMESPACE file and I’ll show you how to use roxygen2 to generate it for you. NAMESPACE is one of the more challenging parts of developing an R package, but it’s critical to master if you want your package to work reliably. Chapter 9, External Data The data/ directory allows you to include data with your package. You might do this to bundle data in a way that’s easy for R users to access, or just to provide compelling examples in your documentation. Chapter 10, Compiled Code R code is designed for human efficiency, not computer efficiency, so it’s useful to have a tool in your back pocket that allows you to write fast code. The src/ directory allows you to include speedy compiled C and C++ code to solve performance bottlenecks in your package. Chapter 11, Installed Files You can include arbitrary extra files in the inst/ directory. This is most commonly used for extra information about how to cite your package, and to provide more details about copyrights and licenses. Chapter 12, Other Components This chapter documents the handful of other components that are rarely needed: demo/, exec/, po/, and tools/. The final three chapters describe general best practices not specifically tied to one directory: Chapter 13, Git and GitHub Mastering a version control system is vital for collaborating with others, and is useful even for solo work because it allows you to easily undo mistakes. In this chapter, you’ll learn how to use the popular Git and GitHub combo with RStudio. Chapter 14, Automated Checking R provides useful automated quality checks in the form of R CMD check. Running them regularly is a great way to avoid many common mistakes. The results can sometimes be a bit cryptic, so I provide a comprehensive cheat sheet to help you convert warnings to actionable insight. Chapter 15, Releasing a Package The life cycle of a package culminates with release to the public. This chapter compares the two main options (CRAN and GitHub) and offers general advice on managing the process. ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: R语言 数据挖掘
 输入关键字,在本站1000多万海量源码库中尽情搜索: