[R] Wikibooks
Romain Francois
rfrancois at mango-solutions.com
Fri Mar 30 14:45:29 CEST 2007
Alberto Monteiro wrote:
> Philippe Grosjean wrote:
>
>> As other have pointed out, the main reason for the lack of success
>> of the R Wiki is that the mailing lists, particularly R-Help, are
>> sooo successful. However, I continue to consider that the mailing
>> list is suboptimal in two cases: (1) when text is not enough to
>> express the idea, and (2) for frequent questions that would
>> certainly deserve a good compilation on a wiki page and a
>> redirection to it everytime the question is asked.
>>
>>
> I think there's one case where the mailing list is non-optimal:
> finding examples. This is where a wiki would be great.
>
> Say I don't know (and I can't understand the help) how to
> use the rnorm function. If I do RSiteSearch("rnorm"), I
> will get too much useless information. OTOH, an ideal wikipedia
> would have a page http://www.r-wiki.org/rnorm, where I could
> find examples, learn the theory, browse the source code, and
> have links to similar functions. OK, maybe that's too much, I
> would be happy just to have some examples :-)
>
Hi,
Do you mean something like (it fullfills basically all your requirements) :
R> rnorm # get the code
R> ?rnorm # get the help page
The wiki already has a similar thing, for example for rnorm, you can go to:
http://wiki.r-project.org/rwiki/doku.php?id=rdoc:stats:Normal
There has been (recently and less recently) some discussions on the
r-sig-wiki list about why sometimes you get ~~RDOC~~ instead of the
documentation page, it is still a work in progress.
The only tricky bit is how do I know that I have to go to stats:normal,
well you can ask that to R, for example using that small function :
wikiHelp <- function( ... , sarcasm = TRUE ){
if( length(hp <- help(...) ) > 0 ){
hp <- tail( strsplit(hp[1], "/")[[1]], 3 )
wikiPage <-
sprintf("http://wiki.r-project.org/rwiki/doku.php?id=rdoc:%s:%s",
hp[1], hp[3])
cat("the following wiki page will be displayed in your browser:",
wikiPage,
">>> Please feel free to add information if you have
some, " , sep = "\n")
if( sarcasm) cat( ">>> except if you are an evil person\n")
browseURL(wikiPage)
} else print( hp )
}
R> wikiHelp( rnorm )
R> wikiHelp( tkWidgets )
R> wikiHelp( seq )
R> wikiHelp( fewqfrwasaqwetgqwtr) # no such page exists
> Also, RSiteSearching is dangerous, because if someone replies
> in an ignorant or malicous way (let's be creative: someone asks
> "how can I open the file CONFIG.SYS", and an evil person replies
> with file.remove("CONFIG.SYS")), then this wrong answer may
> be accessed by newbies. A wikipedia _may_ have wrong answers,
> but these are (hopefully) ephemeral.
>
Are there many people willing to just blindly copy anything and expect
the good result to be returned ?
I don't think there are many evil person around
> BTW, is it too hard to include the wiki in RSiteSearch?
>
The wiki has its own search engine already, so you can go there and use
it. I guess you can search for "search" there and get info on how to
search .
If you are using a Gecko based browser (firefox, flock, ...) you might
want to check that extension that would search the wiki pages for you as
well as the results from the R site search:
http://addictedtor.free.fr/rsitesearch/
HTH,
Romain
> Alberto Monteiro
--
Mango Solutions
data analysis that delivers
Tel: +44(0) 1249 467 467
Fax: +44(0) 1249 467 468
Mob: +44(0) 7813 526 123
More information about the R-help
mailing list