Fix a warning in CMD check

Errors and warnings in packages
Author

Muxin Hua

Published

March 30, 2023

Frontmatter check

Prompt:

Fix one of the problems in one of our community packages at https://github.com/Stat585-at-ISU/lab-3-all-all-for-one-and-one-for-all, and write about it.

Instructions:

What we want to know is the exact warning or error message of the item you fixed, and a description of what you did, also as specific as possible.

Describe your experience below. Push this blog post to your blog-9 repo. Make sure the front matter check passes.

Which error or warning did you fix? … and how?

my answer

The warning message from the item I fixed is
❯ checking dependencies in R code ... WARNING '::' or ':::' import not declared from: ‘purrr’

This must results from using a function from `purrr` package with import missing, so I went to the R code, spotted the function with code purrr:: . In the function defined there, I added one line with #' @import purrr, ran the function devtool::document to make sure `NAMESPACE` is properly updated, I also update Imports in DESCRIPTION.

This is an easy warning to fixed as long as familiarizing with the documentation process in R package and being able to find the function loaded the package.