Displaying 1 result from an estimated 1 matches for "my_addition".
2012 Jan 12
2
is there an equivalent for #ifdef (C langage) in R
...is too many lines in my file...
Is there something like (in C langage):
#define DEBUG 1
#ifndef DEBUG
make_addition = function(a, b) {
#endif
#ifdef DEBUG
a = 1
b = 2
#endif
c=a+b
plot(c)
#ifndef DEBUG
return(c)
}
#endif
my goal is to run my program WITHOUT calling my_addition(1, 2) (for
debugging). The main problem : all variables do not exist when just running
my _file.R , I have to call my_function if I want to see results.
I use RStudio
Thanks for your help
--
View this message in context: http://r.789695.n4.nabble.com/is-there-an-equivalent-for-ifdef-C-langa...