[R] Demo code

Jim Lemon jim at bitwrit.com.au
Fri Oct 26 11:54:05 CEST 2012

On 10/26/2012 09:17 AM, Rlotus wrote:
> I have code in R. I need also demo code of my output and demo code of code. I
> dont know what is demo. An d how to create it...can you tell how to do that
> plz. thank you.
Hi Rlotus,
The "demo" code for a package is usually selected from the examples of 
the functions in the package. Compile an R source code file with the 
examples that you want to include and save it in the "demo" directory 
under the package directory with the same name as the package. Using the 
plotrix package as an example:

	(datasets for the examples)
	00index (a one liner containing:
		plotrix	a demo of many plotrix functions)
	plotrix.R (the demo code)
	(citation file)
	(help pages in Rd markup language)
	(functions in R code)

Having a demo code file is usually only useful if you are creating a 


More information about the R-help mailing list