renozao / FAQR

Frequently Asked Questions on R: my personal Ask Just Once system for my friends' R problems...
0 stars 0 forks source link

Non circular source in R #9

Open Rachelly opened 9 years ago

Rachelly commented 9 years ago

Is there a way to avoid circular sourcing of two files in R? Meaning if I have 2 files that source each other - I want to avoid an endless process of sourcing once I run one of them. In C there is a trick that makes the system avoid this endless sourcing and makes sure each file is being sourced once only..

Thanks!

renozao commented 9 years ago

Just to understand: why do these file source each other? Otherwise you can define a -- different -- variable in each file, test for its existence (?exists) and only source if the variable is not defined.