Skip to content
Prev 28554 / 63468 Next

RFC: What should ?foo do?

Duncan Murdoch wrote:
I agree that man("foo") would be consistent with looking for help with a 
known specific function. I also agree that Linux/Unix users would expect 
such behavior. However, I am not sure that Windows users would be so 
inclined. Certainly as a former Windows user and despite many years of 
programming experience in various environments, I would not, out of the 
gate, have instinctively known or thought about man("foo").

That is not to argue against moving in that direction however. In fact, 
as part of any future consolidation of the myriad help and search 
functions, it would make a great deal of sense that ?foo become an alias 
for man("foo") rather than help("foo").

Thus, the other help/search related functions could also consolidate 
around a mechanism with two key distinctions, that being local versus 
online sources.
My comment there was more of an observation rather than a criticism and 
my apologies if it was taken as the latter. I think it is reasonable to 
expect, that if a useR has 1,300+ CRAN packages installed, that it is 
going to take longer to search that infrastructure, than if the useR 
only has a few.

I would want to have a reasonable expectation however, that if I used 
?t.test as opposed to help.search("t test"), the result would be 
forthcoming in a more efficient manner in the former case than in the 
latter. In the former case, I am typically looking for a specific 
function in a package that is in the search path. In the latter, I am 
searching for related terms/concepts in all installed packages, etc.
Conceptually, my initial reaction, which I think is consistent to an 
extent with the differentiation that Peter made in his reply, is 
positive, though as always, there is the risk of confusion.

 From the perspective of naive users and the KISS approach, I would tend 
to favor the basic distinction of:

1. ?foo or man("foo") - look for the man page for a known specific 
function in the current searchpath

2. help.search("foo") - look for conceptual links related to 'foo', with 
some appropriate wrappers that default to either local or online sources.
I will admit a little ambivalence here. Part of me thinks that a useR 
*should* at minimum, read "An Introduction to R" or at least be inclined 
to look there as their first resource. It does seem that there is some 
expectation from new users that they can just dive in and become 
productive with R immediately, whether or not they have prior 
programming experience and whether or not they have experience with 
other statistical applications. In fact, there is an argument to be made 
that such prior experience can bias their expectations and frame of 
reference.

Reading "Intro" can assist them in beginning to understand the 
conceptual differences in R as compared to these other environments, 
such as methods, vectorized functions, object structures and accessor 
functions, etc.

If a user has found and knows how to use lm() and construct model 
formulae for example, why is it that they don't know about coef(), 
effects(), fitted(), etc. when these are listed on the help page for lm?

They didn't read far enough or they skipped right over the See Also 
section to the examples?

The first instinct has become to post to r-help (as just happened), 
rather than use the phenomenal resources that this community has already 
made available.

So rather than taking a little time to read a bit more, and in the long 
run, save themselves time from posting and waiting for a reply, they 
default to posting.

It is interesting to note that by users doing this, they are in effect 
providing substantive praise to this community and the support provided 
by the lists, in that they have come to expect a pretty rapid response 
from the community 24x7. I suspect that the volume of certain categories 
of e-mails might be quite different if the typical response time on the 
lists was hours rather than minutes...

The first presumption of a useR should be that the available 
documentation might cover these issues or that there is a reasonable 
possibility that somebody else has likely already asked the same 
question and thus if I don't find the answer in "Intro", I should then 
consider searching the list archives.

These are the issues that are covered in the Posting Guide, which 
clearly many don't utilize either.

So, that being the case, how do we provide a conceptual framework for 
seeking assistance in using R and how do we behaviorally modify useRs to 
actually utilize those resources to their own benefit?

I am not looking to solve 100% of the needs, but again within the notion 
of incrementalism and Pareto's 80/20 Rule, how do we address a 
reasonable majority of the needs. How do we get the biggest bang for the 
the investment of time.
As I note above, somehow we need to get users to look to a central 
resource that is platform independent. That resource should include some 
type of overview of the local and online help resources that are 
available for R, and perhaps a suggested hierarchy of use.

It seems logical to me that such a resource be embedded up front in 
"Intro" with it also being included within the existing help system and 
referenced in the start up banner message.
Good point.

Regards,

Marc