I'd like the flow of control to vary depending on where an R program is called from. Something like
if (called_from == 'GUI') {
print('Hello GUI')} else {
print('Hello command line')
}
Is this possible? If so, please provide as many details as possible.