not deciding on
that unfortunately...
That would be for me the ideal solution.
Best regards,
Olivier
De : Fritsch, Katharina (NNL)
Envoyé : vendredi 19 octobre 2018 08:08
À : Olivier GIVAUDAN
Cc : r-help@r-project.org
Objet : RE: [R] Genuine relative paths with R
: Olivier GIVAUDAN [mailto:olivier_givau...@hotmail.com]
Sent: 19 October 2018 06:26
To: Fritsch, Katharina (NNL); Peter Claussen
Cc: r-help@r-project.org
Subject: RE: [R] Genuine relative paths with R
Hi Katharina,
Apologies for the late reply.
Thank you for your proposal which was not made yet
18 05:46
À : Michael Friendly; Duncan Murdoch; Jeff Newmiller
Cc : r-help@r-project.org
Objet : RE: Genuine relative paths with R
Hi Michael,
Apologies for the late reply.
I am very grateful to all the R users who generously spent time on my problem
and suggested operational solutions.
It seems
.
>
> De : Duncan Murdoch
> Envoy� : mercredi 10 octobre 2018 23:51
> � : Olivier GIVAUDAN; Jeff Newmiller
> Cc : r-help@r-project.org
> Objet : Re: [R] Genuine relative paths with R
>
> On 10/10/2018 7:11 PM, Olivier GIVAUDAN wrote:
>>
local).
Best regards,
Olivier
[1] https://shiny.rstudio.com/articles/deployment-local.html
De : Fritsch, Katharina (NNL)
Envoyé : jeudi 11 octobre 2018 08:22
À : Olivier GIVAUDAN; Peter Claussen
Cc : r-help@r-project.org
Objet : RE: [R] Genuine relative paths
GIVAUDAN; Jeff Newmiller
Cc : r-help@r-project.org
Objet : Re: [R] Genuine relative paths with R
On 10/10/2018 7:11 PM, Olivier GIVAUDAN wrote:
It is not wrong to claim that R currently doesn't have a function
returning the path of the R file where this same function was invoked.
But it does. I
rite
any hardcoded (by definition) absolute path beforehand.
*De :* Duncan Murdoch
*Envoyé :* mercredi 10 octobre 2018 23:51
*À :* Olivier GIVAUDAN; Jeff Newmiller
*Cc :* r-help@r-project.org
*Objet :* Re: [R] Genuine relative pat
GIVAUDAN
Sent: 11 October 2018 00:54
To: Peter Claussen
Cc: r-help@r-project.org
Subject: Re: [R] Genuine relative paths with R
Yes, I am aware that both '__FILE__' and 'SAS_EXECFILENAME' are macro
variables. I don't know how the VBA 'Application.ThisWorkbook.Path' VBA or PHP
'__DIR__' (or '__FILE__
-
*De :* Duncan Murdoch
*Envoyé :* mercredi 10 octobre 2018 22:59
*À :* Olivier GIVAUDAN; Jeff Newmiller
*Cc :* r-help@r-project.org
*Objet :* Re: [R] Genuine relative paths with R
On 10/10/2018 6:52 PM, Olivier GIVAUDAN wrote:
Again, you seem to think making a package is a big deal.
If I’m following all this correctly, it seems your criticism is that R doesn’t
provide a run-time function that is equivalent to a compile-time macro. You do
realize that __FILE__ is not part of the C programming language - it’s a
predefined variable recognized by the cpp - the C preprocessor
LaTeX, SAS with macro-variables, etc.)?"
Duncan Murdoch
*De :* Duncan Murdoch
*Envoyé :* mercredi 10 octobre 2018 22:31
*À :* Olivier GIVAUDAN; Jeff Newmiller
*Cc :* r-help@r-project.org
*Objet :* Re: [R] Genuine rela
*De :* Duncan Murdoch
*Envoyé :* mercredi 10 octobre 2018 22:07
*À :* Olivier GIVAUDAN; Jeff Newmiller
*Cc :* r-help@r-project.org
*Objet :* Re: [R] Genuine relative paths with R
On 10/10/2018 5:45 PM, Olivier GIVAUDAN wrote:
I'm not sure I'm "inventing my own way" of dist
UDAN; Jeff Newmiller
*Cc :* r-help@r-project.org
*Objet :* Re: [R] Genuine relative paths with R
On 10/10/2018 4:42 PM, Olivier GIVAUDAN wrote:
Why are you not simply double-clicking on 'TestPWD' and choosing to
execute the file (don't add anything)?
Are you executing the file from a terminal?
-project.org
*Objet :* Re: [R] Genuine relative paths with R
On 10/10/2018 4:42 PM, Olivier GIVAUDAN wrote:
Why are you not simply double-clicking on 'TestPWD' and choosing to
execute the file (don't add anything)?
Are you executing the file from a terminal?
Yes, I was executing the file from my
, creating a package... It's like using a hammer to kill a fly...
De : Duncan Murdoch
Envoy� : mercredi 10 octobre 2018 20:54
� : Olivier GIVAUDAN; Jeff Newmiller
Cc : r-help@r-project.org
Objet : Re: [R] Genuine relative paths with R
On 10/10/2018 4:42 PM, Olivier
y calling it through a terminal for
instance.
De : R-help de la part de Olivier GIVAUDAN
Envoyé : mercredi 10 octobre 2018 20:42
À : Duncan Murdoch; Jeff Newmiller
Cc : r-help@r-project.org
Objet : Re: [R] Genuine relative paths with R
Why are you not si
On 10/10/2018 4:42 PM, Olivier GIVAUDAN wrote:
Why are you not simply double-clicking on 'TestPWD' and choosing to
execute the file (don't add anything)?
Are you executing the file from a terminal?
Yes, I was executing the file from my terminal. Otherwise I really have
no idea what the
-project.org
Objet : Re: [R] Genuine relative paths with R
On 10/10/2018 3:51 PM, Olivier GIVAUDAN wrote:
> Well, no idea...
>
> I just created a file 'TestPWD', made it executable, inserted in it
> these lines and moved the file in various places:
>
> #!/bin/bash
>
> echo $
obre 2018 23:33
> À : olivier_givau...@hotmail.com; r-help@r-project.org
> Objet : Re: [R] Genuine relative paths with R
>
> 1. Assuming you are starting the script from within R, if you want to
> keep all the files used by the script together with the script itself
> then just sour
*Envoyé :* mercredi 10 octobre 2018 14:51
*À :* Olivier GIVAUDAN; Jeff Newmiller
*Cc :* r-help@r-project.org
*Objet :* Re: [R] Genuine relative paths with R
On 10/10/2018 10:37 AM, Olivier GIVAUDAN wrote:
Hi Jeff,
That is, there is not always a file in a particular directory even involved in
-project.org
Objet : Re: [R] Genuine relative paths with R
If you are always running your main script as 'Rscript myscript.R'
then your file argument will appear as '--file=myscript.R' in
commandArgs(). So you can use something like
scriptFile <- function()
{
pat <- "^--file=
; Jeff Newmiller; r-help@r-project.org
Objet : Re: [R] Genuine relative paths with R
I am curious about why it is desirable for a script to know where in the file
system it is. Is it because you have a set of scripts invoking each other? If
so, the best route it to convert the scripts into functions
UDAN; Jeff Newmiller
Cc : r-help@r-project.org
Objet : Re: [R] Genuine relative paths with R
On 10/10/2018 11:18 AM, Olivier GIVAUDAN wrote:
> Hi Duncan,
>
> Yes, if you need to display the content of $PWD you obviously need to
> type 'echo' before this variable.
>
> It prints the use
discussion (while I found
> the 'here' package). But thanks.
>
> Best regards,
>
> Olivier
>
> De : Eik Vettorazzi
> Envoy??? : lundi 8 octobre 2018 11:30
> ??? : Olivier GIVAUDAN; r-help@r-project.org
> Objet : Re: [R] Genuine relati
for me (I am running on the last version of Ubuntu)...
>
> Best regards,
>
> Olivier
>
> De : Duncan Murdoch
> Envoyé : mercredi 10 octobre 2018 14:51
> À : Olivier GIVAUDAN; Jeff Newmiller
> Cc : r-help@r-project.org
> Objet : Re: [R] Genu
,
Olivier
*De :* Duncan Murdoch
*Envoyé :* mercredi 10 octobre 2018 14:51
*À :* Olivier GIVAUDAN; Jeff Newmiller
*Cc :* r-help@r-project.org
*Objet :* Re: [R] Genuine relative paths with R
On 10/10/2018 10:37 AM, Olivier GIVAUDAN
octobre 2018 14:51
*À :* Olivier GIVAUDAN; Jeff Newmiller
*Cc :* r-help@r-project.org
*Objet :* Re: [R] Genuine relative paths with R
On 10/10/2018 10:37 AM, Olivier GIVAUDAN wrote:
Hi Jeff,
That is, there is not always a file in a particular directory even involved in
the executing code.
True
version of Ubuntu)...
Best regards,
Olivier
De : Duncan Murdoch
Envoyé : mercredi 10 octobre 2018 14:51
À : Olivier GIVAUDAN; Jeff Newmiller
Cc : r-help@r-project.org
Objet : Re: [R] Genuine relative paths with R
On 10/10/2018 10:37 AM, Olivier GIVAUDAN wrote
__
De : MacQueen, Don
Envoyé : lundi 8 octobre 2018 16:04
À : Olivier GIVAUDAN; r-help@r-project.org
Objet : Re: [R] Genuine relative paths with R
A few facts (and some opinions):
First fact:
R understands relative paths (as do the other languages you mentioned) (you
have
26207-Using-Projects.
So 'getwd()' returns exactly the same as 'here()' does.
Best regards,
Olivier
De : Jeff Newmiller
Envoyé : dimanche 7 octobre 2018 20:48
À : Olivier GIVAUDAN
Cc : Dénes Tóth; r-help@r-project.org
Objet : RE: [R] Genuine relative paths w
er GIVAUDAN
Cc : Dénes Tóth; r-help@r-project.org
Objet : RE: [R] Genuine relative paths with R
On Sun, 7 Oct 2018, Olivier GIVAUDAN wrote:
> Hello Denes,
>
> > Yes, the path to the "root" folder of your project. You seem to have a
> really esoteric context if you want to
23:33
À : olivier_givau...@hotmail.com; r-help@r-project.org
Objet : Re: [R] Genuine relative paths with R
1. Assuming you are starting the script from within R, if you want to
keep all the files used by the script together with the script itself
then just source the script using the absolute
directory.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
On 10/6/18, 4:48 AM, "R-help on behalf of Olivier GIVAUDAN"
wrote:
Dear R users,
I would like to work with genuine
would like to work with genuine relative paths in R for obvious reasons: if I
move all my scripts related to some project as a whole to another location of
my computer or someone else's computer, if want my scripts to continue to run
seamlessly.
What I mean by "genuine" is that
nd comment.
Best regards,
Olivier
_
De : D?nes T?th
Envoy? : samedi 6 octobre 2018 23:36
? : Olivier GIVAUDAN; Jeff Newmiller; r-help@r-project.org
Objet : Re: [R] Genuine relative p
___
> De : Ista Zahn
> Envoyé : samedi 6 octobre 2018 16:40
> À : olivier_givau...@hotmail.com; r-help@r-project.org
> Objet : Re: [R] Genuine relative paths with R
>
> Hi Olivier,
>
> Sorry for misspelling your name! Please see inline below.
>
> On Sat,
2018 19:31
� : r-help@r-project.org; Olivier GIVAUDAN; r-help@r-project.org
Objet : Re: [R] Genuine relative paths with R
I stopped using hardcoded absolute paths inside R scripts years ago, and I
suspect that is fairly common practice. That is, I almost never enter a path
starting with "/&q
orm-independent.
>
>Best regards,
>
>Olivier
>
>De : Jeff Newmiller
>Envoyé : samedi 6 octobre 2018 19:31
>À : r-help@r-project.org; Olivier GIVAUDAN; r-help@r-project.org
>Objet : Re: [R] Genuine relative paths with R
>
>I stop
DAN
wrote:
>Dear R users,
>
>I would like to work with genuine relative paths in R for obvious
>reasons: if I move all my scripts related to some project as a whole to
>another location of my computer or someone else's computer, if want my
>scripts to continue to run
gt; > default GUI.
> >
> > Best regards,
> >
> > Olivier (and not Oliver )
> >
> > De : Ista Zahn
> > Envoyé : samedi 6 octobre 2018 12:56
> > À : olivier_givau...@hotmail.com
> > Cc : r-help@r-proj
: Ista Zahn
> Envoyé : samedi 6 octobre 2018 12:56
> À : olivier_givau...@hotmail.com
> Cc : r-help@r-project.org
> Objet : Re: [R] Genuine relative paths with R
>
> Hi Oliver,
>
> Interesting question. Can you describe your motivation in a little
> more detail? That
Oct 6, 2018 at 8:25 AM Olivier GIVAUDAN
wrote:
>
> Dear R users,
>
> I would like to work with genuine relative paths in R for obvious reasons: if
> I move all my scripts related to some project as a whole to another location
> of my computer or someone else's computer, if
Dear R users,
I would like to work with genuine relative paths in R for obvious reasons: if I
move all my scripts related to some project as a whole to another location of
my computer or someone else's computer, if want my scripts to continue to run
seamlessly.
What I mean by "ge
43 matches
Mail list logo