rstudio / rstudio/packrat

Most places that use cat() should use message() instead

Open
#28 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
409
Forks
89
PR merge metrics
No merged PRs in 30d

Description

@hadley pointed out that cat() is not the best choice for printing information to the user:

http://adv-r.had.co.nz/Exceptions-Debugging.html

"Function authors can also communicate with their users with print() or cat(), but I don't recommend it because it's hard to capture and selectively ignore this sort of output (and it's not a condition, so you can't use any of the useful condition handling tools)."

We should probably just use message() everywhere; almost all of output is intended to be use user messages of some kind.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are identified. Search the repository for cat() calls and review whether each produces user-facing output that should use message() instead. Done means the appropriate calls have been converted consistently and the existing behavior remains covered by the repository's checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.