[R] path + name of the running R file

MAURICE Jean - externe jean-externe.maurice at edf.fr
Wed Mar 2 09:02:57 CET 2016

Hi Petr,

I am an old FORTRAN programmer and new to R. The 'philosophy' of R is very very far from FORTRAN ! So, may be I am wrong but :

I want to test 3 projects. In fact, these 3 projects are identical but not in the same directory : one within Git (a source management), one on the server and the last one on my local machine. When I run the one in Git, R bombs (and I have no error code, line number, ...). I try to detect what is wrong. So I add cat(), browser() ... to try to 'narrow' the fault (is that clear ?) and the "source()" command is in my target. So I change the current project every 5 minutes ... So when I launch (start ?) the execution of one project and in some functions , I'd like to have the path + name of the .R file being used (perhaps the 'main' file of Git project is doing a source() on a file on the server instead of the one on the Git directory : do you see what I am looking for ?). In other words, I am not sure 100% of the "source()" command and I want to verify it ...


Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.

More information about the R-help mailing list