ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 06.04.2021
Просмотров: 890
Скачиваний: 1
Circle 9
Unhelpfully Seeking Help
Here live the thieves, guarded by the centaur Cacus. The inhabitants are bitten
by lizards and snakes.
There’s a special place for those who—not being content with one of the 8
Circles we’ve already visited—feel compelled to drag the rest of us into hell.
The road to writing a mail message should include at least the following
stops:
9.1
Read the appropriate documentation.
“RTFM” in the jargon. There is a large amount of documentation about R, both
official and contributed, and in various formats. A large amount of documenta-
tion means that it is often nontrivial to find what you are looking for—especially
when frustration is setting in and blood pressure is rising.
Breathe.
There are various searches that you can do. R functions for searching include
help.search
,
RSiteSearch
and
apropos
.
If you are looking for particular functionality, then check the Task Views
(found on the left-side menu of CRAN).
If you have an error, then look in rather than out—debug the problem.
One way of debugging is to set the
error
option, and then use the
debugger
function:
options(error=dump.frames)
# command that causes the error
debugger()
The
debugger
function then provides a menu of the stack of functions that have
been called at the point of the error. You can inspect the state of the objects
inside these functions, and hopefully understand what the problem is.
115
9.2. CHECK THE FAQ
CIRCLE 9. UNHELPFULLY SEEKING HELP
Figure 9.1: The thieves by Sandro Botticelli.
As Virgil said to me, “I’m pleased with all your questions, but one of them
might have found its answer when you saw the red stream boiling.”
9.2
Check the FAQ
Most occurrences of questions are frequently asked questions. Looking through
the FAQ will often solve your problem. Even if it doesn’t, you will probably
learn some things that will avoid later frustration.
9.3
Update
Sometimes you are having a problem that has already been fixed. If the problem
is in a contributed package, you can do:
update.packages()
But this will only give you the latest possible package given the version of R
that you are running. If you are using an old version of R, then you can miss
out on fixes in packages.
There can also be problems if some packages are updated while others are
not.
116
9.4. POSTINGGUIDE
CIRCLE 9. UNHELPFULLY SEEKING HELP
9.4
Read the posting guide
This will give you another point of view about how to approach the remaining
steps. In particular, it will instruct you on what types of questions belong on
the various mailing lists.
Another good resource (not specific to R, but apropos) is a web page called
“How to ask questions the smart way”.
If you have faithfully performed the tasks up to here, you probably do not
need to continue. But do continue if it is warranted.
You can do:
help.request()
on some platforms. This will create a file containing some of the important
information that should be in the message. It also reminds you of steps that
you should take.
9.5
Select the best list
Your choices are R-help, R-devel and the special interest groups. Or the Bio-
conductor list if your question relates to a Bioconductor package.
Pick one—cross posting is seriously discouraged.
There are some topics that should definitely be sent to a special interest
group. For example, questions about garch should go to R-sig-finance. No one
outside of finance knows about garch, nor will they ever. Non-finance people
have no alternative but to think that a garch is someone who lives in Garching.
Garch is a specifically financial model.
Sending the question to the right list is in everyone’s best interest. If you
send a question about garch to R-help, then:
•
Some of the people most qualified to answer your question will not see it
(my guess is that the vast majority of subscribers to R-sig-finance do not
subscribe to R-help).
•
There will be thousands of people for whom the question will be a complete
waste of time.
•
There will be people in the special interest group who could profit from
the answers, but who will never see the answers.
If the functionality you are concerned with is from a contributed package, seri-
ously consider writing only to the maintainer of the package. Should you deem
it appropriate to write to a list, then certainly say what package or packages
are involved.
117
9.6. SUBJECTLINE
CIRCLE 9. UNHELPFULLY SEEKING HELP
Do
NOT
file a bug report unless you are absolutely sure it is a bug—bug
reports entail additional work on the part of R Core. If the behavior is discussed
in this document, it is not a bug. Just because something doesn’t work on your
machine, that does not mean it is a problem in R. If there is a question mark
in your statement (or your mind), it is not (yet) a bug. It can not be a bug if
you do not have a reproducible method of exhibiting the behavior. It is a bug
if you have a well-reasoned argument of why the current behavior is bad, it is
not documented to have the current behavior, and you have a patch to fix the
problem. Patches are highly appreciated. Note that “current behavior” means
the buggy behavior needs to be exhibited in the development version of R—do
not consider it enough to only check whatever version of R you happen to be
running. Also check to make sure the bug has not already been reported.
Even if it is clearly a bug, it may be inappropriate to file an R bug report.
The bug need not be in R, but may be in some other piece of software. If in any
doubt, send a message to R-devel instead. In particular do not file an R bug
report for a contributed package—send your message to the package maintainer.
Another do not: Do not hijack an existing thread. That will make a mess
for people viewing the list by threads. Make a new message addressed to the
list.
9.6
Use a descriptive subject line
Recall what words you used to search the archives (which you did do) to try
to find an answer to your problem, and use a selection of those. Subjects like
“Problem with code” and “Help!!” are less than perfect. A legacy of your mail
should be to improve things for other users—that is unlikely to happen without
an explicit subject line.
With an appropriate subject, more of the right people will read your message
and hence be in a position to give you an answer.
Do not include words like “urgent”. The help you receive on the mailing
lists is a gift, not a right. Being pushy is likely to engender worse service, not
better service.
At the other end of the message there is room for your identity. Some people
refuse to respond to anonymous messages. I find it hard to believe that many
people refuse to respond to a message because the sender
is
identified. So on
balance you may get better response if you identify yourself.
9.7
Clearly state your question
A statement like:
When I use function
blahblah
, it doesn’t work.
118
9.7. CLEARLY STATE
CIRCLE 9. UNHELPFULLY SEEKING HELP
Figure 9.2: The thieves by Sandro Botticelli.
is not a clear statement of your question. We don’t know what “use” means,
we don’t know what you expect “work” to look like, and we don’t know what
“doesn’t work” means.
Explain:
•
What function you are using (for example, there are a number of garch
implementations—you need to say which one you are using).
•
What you want.
•
What you expected.
•
Show us what happened.
•
Show us the output of
str
on your data.
Sometimes background on why you are asking the question is relevant. Consider
the question:
Is there a way to order pizza with R?
The answer is, of course, “Of course there is a way to order pizza. This
*is*
R.”
119