[R-wiki] graphics gallery in wiki?
Philippe Grosjean
phgrosjean at sciviews.org
Tue Feb 14 01:46:46 CET 2006
OK, now the integration between the R Wiki and the R Graph Gallery is
almost completelly done. Romain and myself have added this:
1) A link to a wiki page for each graph in the R Graph gallery
2) The Wiki page relating to a given graph in the R Graph Gallery are in
the section 'graph_gallery:graphXX', where XX is the number of the graph
in the gallery. The page displays the graph (with a link to the
corresponding page when you click on it), a link to the R code to
generate this graph and a "Wiki discussion" section where people can add
comments, further code, examples, etc... (see for instance
http://www.sciviews.org/_rgui/wiki/doku.php?id=graph_gallery:graph51)
3) The corresponding pages are only created when someone add comments in
the Wiki. If a page does not exist yet, a click from the Graph Gallery
on the 'wiki page' link shows a "this topic does not exist yet" page...
and you can click "Create this page" to create it. It is created from a
template with all the required code already introduced. The reasons for
not creating these pages automatically: we have only pages with material
in the index, and no need to synch with the R Graph Gallery database.
4) A specific Wiki plugin generates the HTML code for the image and the
link. Its syntax is very simple: {{arg>RGraph}}, and it does the rest
for you!
5) For linking to graphs in the R Graph Gallery from elsewhere in the
Wiki, I have added "interwiki" shortcut. You just have to type
[[rgg>XX]] (where XX is the number of the graph) and you got a link to
that page with a nice little bargraph icon in front of it. This is the
same for linking to R code corresponding to the graph: you use just
[[rggcode>XX]]. You can see this in:
http://www.sciviews.org/_rgui/wiki/doku.php?id=wiki:specialformat
Best,
Philippe Grosjean
P.S.: for further integration, we should just look at an harmonization
of the CSS between the two sites... and also on the colors for the code
syntax coloring.
P.S.2: I also added convenient interwiki shortcuts for packages on CRAN,
with little package icons. Try for instance [[rp>abind]],
[[rpindex>abind]] & [[rppdf>abind]] (see also in the wiki:specialformat
page)
..............................................<°}))><........
) ) ) ) )
( ( ( ( ( Prof. Philippe Grosjean
) ) ) ) )
( ( ( ( ( Numerical Ecology of Aquatic Systems
) ) ) ) ) Mons-Hainaut University, Pentagone (3D08)
( ( ( ( ( Academie Universitaire Wallonie-Bruxelles
) ) ) ) ) 8, av du Champ de Mars, 7000 Mons, Belgium
( ( ( ( (
) ) ) ) ) phone: + 32.65.37.34.97, fax: + 32.65.37.30.54
( ( ( ( ( email: Philippe.Grosjean at umh.ac.be
) ) ) ) )
( ( ( ( ( web: http://www.umh.ac.be/~econum
) ) ) ) ) http://www.sciviews.org
( ( ( ( (
..............................................................
Romain Francois wrote:
> (...)
>
>>>
>>> I agree. That solution is the easiest, and i think the better.
>>>
>>> Is there a way to add new commands to the wiki, such as <gg 25> that
>>> will add the corresponding image, ie :
>>> http://addictedtor.free.fr/graphiques/graphiques/graph_25.png.
>>> Or <ggc 25> to call the source code, ie :
>>> http://addictedtor.free.fr/graphiques/sources/source_25.R or the html
>>> ready http://addictedtor.free.fr/graphiques/highlight/high_25.html
>>
>>
>> Yes, there is the "interwiki" feature that rewrites links like
>> [[wp>wiki]] to link to Wikipedia, topic "wiki". I'll see how I can add
>> something to link to graphs and code.
>>
>> By the way, for the code in the R graph gallery, I suggest you use the
>> same modified GeSHi engine with R syntax highlighting that I am
>> designing for the Wiki. It provides links to R functions man pages and
>> nice syntax coloring of code. It is a PHP script. So, easy to integrate.
>>
>> Currently, I am fighting with it to allow a better formatting of code
>> (for instance, do not colorize arguments names similar to function
>> names, as if they were functions, like in: x <- matrix(1:9, nrow = 3),
>> where 'nrow' should not be colorized as a function, although the
>> 'nrow()' function exists in a different context).
>
> I know that kind of fights, highlight did the same. There is also a
> problem with the functions withs dots, like as.numeric, etc ..
> It is difficult to tell these softwares that as.numeric is a keyword
> when as and numeric are also. I came up with a simple bash script that
> removes everything like "</span>.<span"
>
>> I'll send you the customized GeSHi engine as soon as I will finish
>> this fine-tuning.
>
> Great, Thanks.
> And if we end up with the same css file, that will consolidate the
> bridge between the two places.
>
>>> Where would i link. I created
>>> http://www.sciviews.org/_rgui/wiki/doku.php?id=rgg
>>> So maybe i can use http://www.sciviews.org/_rgui/wiki/doku.php?id=rgg:25
>>> Tell me if it is better to put that some place else, maybe
>>> snippets:graphics-misc ?
>>
>> Take care that the final URL will be different from
>> http://www.sciviews.org/_rgui/wiki.
>
> I know, that will not be too difficult to change in RGG. I just have to
> be synchronized.
>
>> I will dedicate a server for the R wiki at my University. Also, it is
>> most probable that we end up with something like
>> http://wiki.r-project.org, or http://www.r-project.org/wiki.
>
> The first one looks really cool
>
>> For the location of the pages, I suggest something like:
>> graph_gallery:graph25. 'rgg' is not informative enough. So the
>> *temporary* link should be:
>> http://www.sciviews.org/_rgui/wiki/doku.php?id=graph_gallery:graph25
>
> Ok, i'll make the changes.
>
>> The simplest way is to let create a page from this link (you first
>> have a message that the page does not exists, suggesting you to create
>> it). Then, I could add a template with a default title, a common text
>> and the link to both the graph and the corresponding code (once the
>> "interwiki" feature will be added) in that template.
>>
>> I really think it is the best solution: we continue to use your
>> excellent graph gallery engine, and we allow users to puts comments in
>> the best place for that: the R wiki.
>
> And yet, it is so simple
>
>> Philippe
>
>
More information about the R-sig-wiki
mailing list