Skip to content

drawExpression package

3 messages · Sylvain Loiseau, Philippe GROSJEAN

#
Hello all,

Following a discussion at the end of december [1] I created a package "drawExpression" on R-Forge. It is still in a very early stage! Here is a draft of a PDF "visual reference card" that show the usage of the code:

https://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/visualRefCard/visualRefCard.pdf?rev=3&root=drawexpression&view=log

Advices welcome!
Best,
Sylvain

[1] https://stat.ethz.ch/pipermail/r-devel/2009-December/056170.html
#
Hello,

Excellent initiative. That is going to be very interesting too for 
complex stuff like loops and if() statements.

A couple of suggestions:
- In general, I would add corresponding R input and output just beneath 
the "visual" display of what happens, so that readers can try it in R 
and see what happens.

- P. 1, para. 1: ... have a common mode, one of character, logical, and 
numeric (to match the order of visual items).

- P. 3, para. 4: The character mode always wins. Logical always looses.

- P. 5, para. 11: A little sentence explaining nchar() would be useful. 
Something like: "Count the number of characters in each string:"

- P. 6, para. 14.1: again, a little explanation: "Matrices are filled by 
  columns by default :" ... "But you can change it :"

- P. 7, para. 14.2: "Matrices have two dimensions and you must provide 
extractors for each of them. You first extract the rows, then the columns."

- P. 9: you use merge() that creates a list, before introducing what a 
list is... This is confusing.

- P. 11, para. 16.1: you use regular expressions without introducing 
what it is. No R beginner that has not done serious programming knows 
what a "Regexp" is.

(P.S.: Juste apr?s avoir ?crit tout ceci, je me rend compte que tu 
travailles ? l'Universit? de Caen. Je suis pass? par l?: j'ai mis en 
place les nouvelles infrastructures d'?levage d'oursins ? la Station 
Marine de Luc-sur-mer il y a une quinzaine d'ann?es de cela.

Bon week-end,

Philippe Grosjean
..............................................<?}))><........
  ) ) ) ) )
( ( ( ( (    Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (    Numerical Ecology of Aquatic Systems
  ) ) ) ) )   Mons University, Belgium
( ( ( ( (
..............................................................
Sylvain Loiseau wrote:
#
Yes, it lacks something like that. Perhaps a first line which copy the concrete code evaluated.
Thanks! I have corrected all that.
Well, it creates a data.frame I think, and data.frame aren't handled yet (they are seen as list)... I need a graphical convention for data.frame and for factor.

I'm wondering also how to represent functions that need a *symbol* as one of the arguments, for instance
Well, this is right, but there is a mix of different logics. At the beginning, it was supposed to include very few text, to stress general principles of the langage, and to be like a reference card for quickly checking the behavior of a method. For instance, which column names are preserved by cbind? The first matrix column names or the second? etc. But the document is becoming rather an introductory text.
J'y fais de la linguistique de corpus, mais pr?cairement !

Regards,
Sylvain

--
Sylvain Loiseau
sylvain.loiseau at unicaen.fr

Universit? de Caen Basse Normandie
Maison de la Recherche en Sciences Humaines
MRSH - SH018
Esplanade de la Paix
Campus 1
14032 Caen Cedex