Skip to content

Commit

Permalink
add example of documenting a function
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanwerner committed Aug 1, 2016
1 parent 882197f commit 88d99ce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion BERT/BERT_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#ifndef __BERT_VERSION_H
#define __BERT_VERSION_H

#define BERT_VERSION L"0.74"
#define BERT_VERSION L"0.75"

#endif // #ifndef __BERT_VERSION_H

14 changes: 14 additions & 0 deletions Examples/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ matrix.to.frame <- function( mat )
#
source( "ExcelFunctions.R" );

# add custom documentation to the Excel "insert function" dialog for
# exported R functions using attributes. NOTE: this is experimental
# and the interface may change in the future.

documented.function <- function( A, B ){
A + B;
}

attributes( documented.function ) <- list( description=list(
"Example of documenting a function. It will add arguments together.",
A="A number",
B="Another number"
));

# this is the new file watcher utility. uncomment the line below and
# this file will be reloaded any time it's saved. by default, it will run
# BERT$ReloadStartup, but you can pass a function to run any arbitrary
Expand Down

0 comments on commit 88d99ce

Please sign in to comment.