Christophe

I learnt by first language(C) using programming structures similar to the
ones you have mentioned, though i do not see any such programming examples
in R books that I have read. The book which comes closest to teaching R
like i learnt C is Norman Matloff. the art of R programming. The
arrangement of the book is similar to how a normal coding book is written (
a chapter on elementary datatypes and how to declare them, followed by
chapters on loops,controls, other syntax and then followed by more advanced
datatypes(list and frame in case of R).
However even this book does not have the type of examples that you have
mentioned. However if the introductory learner can set up an R environment
and if he works through the solved examples given in the book by actually
typing them in R, that may solve your purpose.

Hope this helps

Nilesh
Forwarded Message
Yes, it is quite different from what I am looking for which will be
more
something like :

--- 8< -----

Exercice 1: wrote a function that compute the surface of a rectangle

Exercice 2: wrote a function that compute factorial n (whithout using
the
function factorial)

Exercice 3: wrote a function, that given a n, will draw a triangle of
"*".
Example with n=5

*
**
***
****
*****

--- 8< -----

The first exemple is about writing a (very) simple function and
returning the result ; the second
need the use of a loop. The third will need two loops (for a beginer).

And so on, on various topic.

Christophe

	[[alternative HTML version deleted]]

