3  Help

Working with targets can be challenging, and sometimes you may need help from a human. However, offering that help can be just as challenging because every use case is different. If your questions are easy to answer, you will get faster, more useful responses. This chapter shares advice about asking effective questions. Please read this page in full before reaching out for support.

Summary

Before you post a question, please read through all the sections of in this chapter.

  • Follow the code of conduct.
  • Do not post sensitive or confidential information.
  • Search existing posts.
  • Update your R packages.
  • Isolate the source of the error.
  • Write a reprex.

3.1 Before you post

3.1.1 Code of conduct

All developers, users, and other discussants must follow the code of conduct. Please read it before engaging in discussion.

3.1.2 Sensitive information

The discussion forums from Section 3.4 are open to the public, and anyone with an internet connection can read them. Please do not share any company confidential information, personally identifiable information, private research data, or any other sensitive information.

3.1.3 Search existing posts

It is tedious to answer the same question repeatedly, so please check if your question already has an answer. Section 3.4 links to searchable online discussion forums with thousands of existing posts. If a relevant thread already exists, please read it first. Then, if necessary, please comment there instead of starting a new post.

3.1.4 Try troubleshooting

If you are struggling with targets, please follow the steps below and take an active role in the troubleshooting process. Even if you do not solve the problem on your own, your findings from troubleshooting will help you ask effective questions when you talk to a live human.

3.2 Troubleshooting

3.2.1 Update your R packages

If you encounter a bug in targets or tarchetypes, the bug may have already been fixed in a newer version. Before posting, please try again with the latest CRAN release of targets (or tarchetypes), then again with the GitHub development version if needed. Please see https://docs.ropensci.org/targets/#installation for installation instructions.

3.2.2 Isolate the source of the error

An error in a targets pipeline might not originate from the targets package itself. The underlying cause might be a bug in one of the R packages that targets depends on, or it might come from the custom R code you inject into your pipeline. As best you can, please try to find the true source of the error. For example, try running similar code without the targets package and see if you get the same error. If the error does not come from targets itself, please do not post your question on a targets-focused discussion forum.

3.3 When posting

If you post a question or bug report, please clearly and concisely explain:

  1. What you are trying to do (1-2 sentences).
  2. What happened that you do not like.
  3. What you want to happen instead.

In addition, please post a reprex (explained below).

3.3.1 Write a reprex

When something goes wrong, it is natural to simply share the error and ask why it happened. But this is not enough information, not even for an expert in targets. Any response would be guesswork, and guesses about computer code are usually wrong. The person helping you needs to actually run your code. This is the only way to test that a solution really works.

When you ask for help with a problem, please provide a reprex1. A reprex is a small sample of runnable code that emulates the problem. If you provide a reprex, the person helping you can troubleshoot empirically, and the responses you get will be faster and more useful.

A viable reprex must:

  1. Be runnable by anyone else. For example, do not reference private files that only you can access.
  2. Actually generate the expected error when someone else runs it.

In addition, a good reprex:

  • Has clean and readable code.
  • Runs quickly on any machine.
  • Is simple and concise enough for someone else to digest quickly and understand without much effort.

The following posts explain how to write a good reprex.

The discussion forums of targets and tarchetypes have excellent reprexes from users.

3.4 Contact

There are many ways to reach out.

3.4.1 Community

You can reach out to the R community at these public forums.

3.4.2 Maintainer

To contact the maintainer directly, please post to the relevant public GitHub Discussions page of the package (if your question does not already exist).2 Examples:

Public discussions are searchable, and they help answer questions from other users in the future. So please avoid private emails, instant messages, or mentions on social media.

3.5 How you can help

If you have a free moment to help someone else in the discussion and issue forums, we would greatly appreciate it. Any amount of engagement, no matter how small, makes a tremendous difference. C.f. https://ropensci.org/blog/2024/02/29/targets-call-help/.


  1. Also known as a reproducible example, minimal reproducible example, or minimal working example.↩︎

  2. You may need to create a free GitHub account, but the process is straightforward.↩︎