00001 ##' @file R-sample.R 00002 ##' @brief This is a sample of a package. 00003 ##' 00004 ##' Has mostly functions, couple of statics and no scripting. 00005 ##' @note 00006 ##' Demonstrates some basic doxygen. Note the comment is special. ## and # are 00007 ##' passed over. 00008 00009 ##' test function returns one. 00010 ##' @param car input variable 00011 ##' @return one 00012 00013 doxytest <- function(car) { 00014 n=car 00015 } 00016 00017 ##' test function returns one 00018 ##' @param car input variable 00019 ##' @return one 00020 00021 doxytest1 00022 <- function(car) { 00023 n=car 00024 } 00025 00026 ##' test variable. 00027 var1 <- c(10, 20) 00028 00029 ##' test function returns one. 00030 ##' @param car input variable 00031 ##' @return one 00032 00033 .doxytest 00034 <- function(car) { 00035 n=car 00036 } 00037 00038 ##' test function returns one. 00039 ##' 00040 ##' No classing or overload supported. \@overload may work. 00041 ##' @param car input variable 00042 ##' @return one 00043 00044 as.doxytest <- function(car) { 00045 n=car 00046 } 00047 00048 ##' A plot with a dot. 00049 ##' 00050 ##' Dots in the names are mapped to _. 00051 ##' @param car input variable 00052 ##' @return one 00053 .doxytest.plot 00054 <- function(car) { 00055 n=car 00056 } 00057 00058 ##' Quoted name but has a space. 00059 ##' 00060 ##' Allowed quoted names, the lexer will remove the quotes, but does nothing with it. 00061 ##' So it will appear as a type. 00062 ##' 00063 ##' @param car input variable 00064 ##' @return one 00065 "doxytest quoted" 00066 <- function(car) { 00067 n=car 00068 } 00069 00070 ##' Quoted name no spaces. 00071 ##' 00072 ##' Allowed quoted names, the lexer will remove the quotes, but does nothing with it. 00073 ##' 00074 ##' @param car input variable 00075 ##' @return one 00076 "doxytest_quoted" 00077 <- function(car) { 00078 n=car 00079 } 00080 # normal comment 00081 m=n; 00082 00083 ##' test function2 returns nothing. 00084 ##' @param philbert input variable 00085 subfunct <- function (philbert) { 00086 n=philbert/2 # end of line comment 00087 m=n 00088 } 00089 00090 ##' The last function. 00091 ##' 00092 ##' @param g input param 1 00093 ##' @param a input param 2 00094 ##' @param d input param 3 00095 ##' @return a,b value of param d 00096 last_Func <- function (g, a,d) { 00097 a=d 00098 subfunct(a) 00099 b=doxytest(g) 00100 } 00101 00102