Prepare a simple R package for distributing documented functions
Explain the terms Repository
, Dependency
, and Namespace
Implement testing in an R package
Collaboratively work on an R package on GitHub
shareable
collection of documented
code and/or dataImports
vs Depends
An issue with R4.3. Solution: Build tab > install
Solution: Delete NAMESPACE
file and rerun devtools::document()
Solution: Fix GitHub conflicts
devtools::check()
❯ checking examples ... ERROR
Running examples in ‘cdogma-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hello
> ### Title: Hello, World!
> ### Aliases: hello
>
> ### ** Examples
>
> hello()
Error in hello() : could not find function "hello"
Execution halted
devtools::check()
❯ checking examples ... ERROR
Running examples in ‘cdogma-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hello
> ### Title: Hello, World!
> ### Aliases: hello
>
> ### ** Examples
>
> hello()
Error in hello() : could not find function "hello"
Execution halted
Solution: Delete R/hello.R
and man/hello.md
R package
that simulate (more or less) the central dogma of molecular biology.@importFrom package function
tag to a function description compared to using package::function()
.They increase the size of our package.
Can introduce compatibility issues.
They increase maintenance.
They are rarely completely avoidable.
@importFrom package function
and @import package
package::function
package::function
…
R for Bio Data Science