SCM

SCM Repository

[inlinedocs] View of /pkg/inlinedocs/inst/testfiles/attrExamples.R
ViewVC logotype

View of /pkg/inlinedocs/inst/testfiles/attrExamples.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 156 - (download) (annotate)
Fri Oct 29 13:06:55 2010 UTC (7 years, 10 months ago) by tdhock
File size: 1163 byte(s)
R CMD check for each testfile
helloWorld <- function
### function for which an example should be added
( ){
  cat("Hello World!\n")
  invisible(NULL)
  ### None (invisible NULL)
}

attr(helloWorld,"ex") <- function(){
	# all text including comments inside this block 
	# should go to the examples section of 
	# function helloWorld
	helloWorld()	# prints Hello World
}

.tmp.f <- function(
	### some non-exported interactive debugging code.
){
	# first source test.R from inlinedocs
	fname <- file.path("inst","testfiles","attrExamples.R")
	#library(debug); mtrace(extract.file.parse)
	#save.test.result(fname)
	#test.file(fname)
}

.result <- 
	list(helloWorld = list(definition = "helloWorld <- function\n### function for which an example should be added\n( ){\n  cat(\"Hello World!\\n\")\n  invisible(NULL)\n  ### None (invisible NULL)\n}",  
			description = "function for which an example should be added",  
			value = "None (invisible NULL)", examples = "\n# all text including comments inside this block \n# should go to the examples section of \n# function helloWorld\nhelloWorld()\t# prints Hello World\n",
               format="",title="helloWorld"))

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge