[R] libPaths displays truncated path?

Loris Bennett loris.bennett at fu-berlin.de
Fri Nov 24 15:29:18 CET 2017


peter dalgaard <pdalgd at gmail.com> writes:

[snip (40 lines)]

>> I don't quite understand the point about cause and effect.  If
>> normalizePath changes the symbolic link from
>> 
>>  /cm/shared/apps/R/site-library/3.4.2
>> 
>> to the actual directory
>> 
>>  /cm/shared/apps/R/site-library/3.4
>> 
>> in libPaths, why does R fail to find the packages *unless* the symbolic
>> link exists?
>
>
> I was unclear/confused about that. I somehow got the impression that
> the symlink was the cause of the problem that it solved, but that is
> not true.
>
> AFAICT there are two scenarios
>
> Ground facts:
>
> library is in  .../3.4
> you're trying to add .../3.4.2 using .libPaths
>
> (A) no symlink:
>
> Actual libpath will have .../3.4.2 which isn't there --> FAIL
>
> (B) symlink in place
>
> Actual libpath normalized to use .../3.4 which is there --> SUCCESS
>
> If normalizePath hadn't been applied, (B) would still succeed, the
> libpath would be to 3.4.2 which exists as a link to 3.4 and (A) would
> still fail because you are fundamentally looking in the wrong place.
>
> -pd

Now I understand.  I had scenario A and FAIL, then added the symbolic
link to get B and SUCCESS, whereby normalizePath means that the actual
directory and not the symbolic link is being used.

It all makes sense now (in an odd sort of way).  Thank you.

[snip (13 lines)]

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin         Email loris.bennett at fu-berlin.de



More information about the R-help mailing list