Call main() when starting R