开始使用免费开始使用

Finalize your DESCRIPTION file

The DESCRIPTION file is a crucial component of an R package as it provides essential metadata and information about the package. It serves as a central hub for describing the package's title, version, authorship, dependencies, and other key details. The DESCRIPTION file is used for package installation, distribution, and documentation, ensuring proper identification and functioning of the package within the R ecosystem.

It stores many different useful fields for documenting information about the package including the Title, Version, Authors@R, and Description components.

本练习是课程的一部分

Developing R Packages

查看课程

练习说明

  • Update the Title field to be Unit Conversion Utilities for Distance, Time, Weight, and Temperature.
  • Update the Version field to be 0.1.0.
  • Update the Authors@R field to be "R" as the given name, "User" as the family name, no middle name, and email [email protected].
  • Update the Description field to be The package provides a collection of utility functions for converting distance, time, weight, and temperature values..

交互式实操练习

通过完成这段示例代码来试试这个练习。

{"DESCRIPTION.Rmd":"Package: unitConverter  \nTitle: What the Package Does (One Line, Title Case)  \nVersion: 0.0.0.9000  \nAuthors@R: \n    person(\"First\", \"Last\", , \n           \"[email protected]\", \n           role = c(\"aut\", \"cre\"))\nDescription: What the package does (one paragraph).  \nLicense: CC0  \nEncoding: UTF-8  \nRoxygen: list(markdown = TRUE)  \nRoxygenNote: 7.2.3  \nDepends:  \n    R (>= 2.10)  \nLazyData: true  \nSuggests:   \n    ggplot2 (>= 3.0.0),  \n    tibble,  \n    knitr,  \n    rmarkdown,  \n    testthat (>= 3.0.0)  \nVignetteBuilder: knitr  \nConfig/testthat/edition: 3\n\n\n"}
编辑并运行代码