thank you very much for helping. When I type R from normal bash outside geany it works fine. When I type geany -v at the prompt outside geany, this is what I get
marco@marco-desktop:~$ geany -v
Geany-INFO: Geany 1.23, en_GB.UTF-8
Geany-INFO: GTK 2.24.10, GLib 2.32.3
Geany-INFO: System data dir: /usr/share/geany
Geany-INFO: User config dir: /home/marco/.config/geany
Geany-INFO: System plugin path: /usr/lib/x86_64-linux-gnu/geany
Geany-INFO: Added filetype Go (55).
Geany-INFO: Added filetype Cython (56).
Geany-INFO: Added filetype Genie (57).
Geany-INFO: Added filetype Scala (58).
Geany-INFO: /home/marco/R/tex/commentary.tex : LaTeX (UTF-8)
Geany-INFO: /home/marco/R/reportEurope1.r : R (UTF-8)
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
(geany:2732): Tagmanager-CRITICAL **: get_tag_type: assertion `tag_name' failed
Geany-INFO: Missing symbol-tree parent iter for type 524288!
Geany-INFO: Missing symbol-tree parent iter for type 524288!
Geany-INFO: Missing symbol-tree parent iter for type 524288!
Geany-INFO: Missing symbol-tree parent iter for type 524288!
Geany-INFO: Missing symbol-tree parent iter for type 524288!
Geany-INFO: Missing symbol-tree parent iter for type 524288!
Geany-INFO: Missing symbol-tree parent iter for type 524288!
Geany-INFO: Missing symbol-tree parent iter for type 524288!
Geany-INFO: Missing symbol-tree parent iter for type 524288!
Geany-INFO: Missing symbol-tree parent iter for type 524288!
(geany:2732): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion `GTK_IS_MENU_SHELL(menu)' failed
It looks therefore there is an error in GTK MENU SHELL...
Marco