### Don't run
### Put everything before the next comment into a text file <<your filename>>
#structure( function( x) \{
# x*x
#\}
#,doc=flatdoc("<<end of doc>>"))
#Here is some informal documentation for the "SQUARE" function
#<<end of doc>>
### Now try SQUARE <- source.mvb( <<your filename>>); ?SQUARE
### Example with multiple attributes
### Put everything before the next comment into a text file
#myfun <- structure( function( attname) \{
# attr( sys.function(), attname)
#\}
#, att1=flatdoc( EOF="<<end of part 1>>")
#, att2=flatdoc( EOF="<<end of part 2>>"))
#This goes into "att1"
#<<end of part 1>>
#and this goes into "att2"
#<<end of part 2>>
### Now "source.mvb" that file, to create "myfun"; then:
#myfun( 'att1') # "This goes into \\\"att1\\\""
#myfun( 'att2') # "and this goes into \\\"att2\\\""
### End don't run
Run the code above in your browser using DataLab