[R-wiki] Collecting all R Wiki tips together - new version

Philippe Grosjean phgrosjean at sciviews.org
Thu Jun 29 12:42:43 CEST 2006


Paul Johnson wrote:
> OK, I've been testing this and found a small typo in your code (extra
> comma), but logged in and fixed it.  Now the program runs for me.
> 
> I see the problem with Headers.  That is a tough one.
> 
> I considered just manually designing a page with hard coded headers
> and then use your function for each one, but it generates separate
> html pages as output.  I think I can fix that by re-working your
> function a bit, but I'm hesitant to work too hard on this because the
> situation is so fluid.  (You know, the "old way" alltips you started
> and I continued did actually work, headers and all.)

Well, this could be a solution: design the table of content manually. 
This could be easily added in the function (add a toc = NULL argument; 
if NULL, it generates the TOC, if it is a file or character string, use 
it instead -and then, extract the name of pages to include from your own 
TOC-). However, with this mechanism, you loose the benefit of not 
including missing pages in the TOC.

> I have a question about your html output.  In  your item listings, you
> have both "name" and "id" declared, but with the same values. Example
> 
> <a name="
> tips:data-io:aggregate_values
> " id="
> tips:data-io:aggregate_values
> "></a>
> 
> To the best of my understanding, the "id" here is superflous, or
> perhaps even incorrect.  There is no CSS information associated with
> the specific tip "tips:data-io:aggregate_values" is there?

Well, I just reuse formattings done by the Wiki engine. With the new 
version of DokuWiki, both CSS and javascript modules associated with the 
page are build dynamically through php code. Also, it results in pretty 
unreadable files (everything on a single line, cryptic variable names, 
etc.). The goal of this cryptic code is not to make it less readable, 
but to shorten the file so that it load faster. However, the consequence 
is that it is also more difficult to track what and how things are 
actually used. So, for security, I decided to specify both 'name' and 
'id'. But otherwise, I agree with you that they are probably redundant.

Philippe

> pj
> 
> On 6/28/06, Philippe Grosjean <phgrosjean at sciviews.org> wrote:
> 
>>Hello Paul, hello all,
>>
>>I have tried to take your remarks into account and to polish the
>>functions that Romain François cooked to collect all R tips into a
>>single page. The result is in
>>http://wiki.r-project.org/rwiki/doku.php?id=tips:misc:alltips.
>>
>>T
> 
>



More information about the R-sig-wiki mailing list