Remove site path from .libPaths

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Remove site path from .libPaths

Rainer M Krug-6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I am sure I am missing something really basic, but I can't figure it out.

I want to start R so that I can specify the location for the Library tree. In principel simple:

As I only want it dependent on the directory I stat R in, I put a .Rprofile file in the directory.

My default path is:

> .libPaths()
[1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15"
[2] "/usr/lib/R/site-library"
[3] "/usr/lib/R/library"
>

But I want to have it

> .libPaths()
[1] "/home/rkrug/THE_DIRECTORY/library"
[2] "/usr/lib/R/library"
>

The first part is easy:

.libPaths("/home/rkrug/THE_DIRECTORY/library")

but how can I remove the site library?

If I set

In R 15.2 under Ubuntu, started with

R --vanilla

> .libPaths()
[1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15"
[2] "/usr/lib/R/site-library"
[3] "/usr/lib/R/library"
> .Library.site
[1] "/usr/lib/R/site-library" "/usr/lib/R/library"
> .Library
[1] "/usr/lib/R/library"
> .Library.site <- "" .Library.site
[1] ""
> .libPaths()
[1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15"
[2] "/usr/lib/R/site-library"
[3] "/usr/lib/R/library"
> .libPaths("") .libPaths()
[1] "/usr/lib/R/site-library" "/usr/lib/R/library"
> .Library
[1] "/usr/lib/R/library"
> .Library.site
[1] ""
>


> .libPaths("") .libPaths()
[1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>

even executing

> .libPaths(.libPaths())

does not change anything.

Am I missing something or is there a bug in .libPaths()?

Cheers,

Rainer



- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      [hidden email]

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRHkX0AAoJENvXNx4PUvmCgDYH/jwOadmO1cpPAK2yNaCfldjm
gzQ4wLf6o846xM8UQj78rIczvlycLqJP84jZe8kf8iHItFKSQbekpzujazIVEpcV
TCcaiLbm9ex5qpnRVAH8VOph59acsnEjo67dztmBl+uPb30l4hmG/dwgUeJE7HrP
oy+jtJZVostGzSiKV8wXv9C4Ohu9WWQ3Rw7VEGRKsAWcDfHGl79isEA5+ONbJjdz
32erpXBbCquJPFV4OGT7DqI8D/xh8dTVNK9ew/cdUjXlCysGAHUEQXRX2z+oxcJ5
OIwNzCADjgM1/yIc5hCtTZtFIvFWo169vTgM2/0UDnpneJLHCrHFvuU94eo/6cI=
=pJ7s
-----END PGP SIGNATURE-----

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Remove site path from .libPaths

Duncan Murdoch-2
On 13-02-15 9:28 AM, Rainer M Krug wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> I am sure I am missing something really basic, but I can't figure it out.
>
> I want to start R so that I can specify the location for the Library tree. In principel simple:
>
> As I only want it dependent on the directory I stat R in, I put a .Rprofile file in the directory.
>
> My default path is:
>
>> .libPaths()
> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15"
> [2] "/usr/lib/R/site-library"
> [3] "/usr/lib/R/library"
>>
>
> But I want to have it
>
>> .libPaths()
> [1] "/home/rkrug/THE_DIRECTORY/library"
> [2] "/usr/lib/R/library"
>>
>
> The first part is easy:
>
> .libPaths("/home/rkrug/THE_DIRECTORY/library")
>
> but how can I remove the site library?
>
> If I set
>
> In R 15.2 under Ubuntu, started with
>
> R --vanilla
>
>> .libPaths()
> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15"
> [2] "/usr/lib/R/site-library"
> [3] "/usr/lib/R/library"
>> .Library.site
> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>> .Library
> [1] "/usr/lib/R/library"
>> .Library.site <- "" .Library.site
> [1] ""
>> .libPaths()
> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15"
> [2] "/usr/lib/R/site-library"
> [3] "/usr/lib/R/library"
>> .libPaths("") .libPaths()
> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>> .Library
> [1] "/usr/lib/R/library"
>> .Library.site
> [1] ""
>>
>
>
>> .libPaths("") .libPaths()
> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>>
>
> even executing
>
>> .libPaths(.libPaths())
>
> does not change anything.
>
> Am I missing something or is there a bug in .libPaths()?

I don't think there is a bug.  As ?.libPaths says,

"Function .libPaths always uses the values of .Library and .Library.site
in the base namespace. .Library.site can be set by the site in
‘Rprofile.site’, which should be followed by a call to
.libPaths(.libPaths()) to make use of the updated value."

So you can't change the value of .Library.site after starting R.  You'll
need to use environment variables (as described on that page) to do it.

Duncan Murdoch

>
> Cheers,
>
> Rainer
>
>
>
> - --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
> (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel :       +33 - (0)9 53 10 27 44
> Cell:       +33 - (0)6 85 62 59 98
> Fax :       +33 - (0)9 58 10 27 44
>
> Fax (D):    +49 - (0)3 21 21 25 22 44
>
> email:      [hidden email]
>
> Skype:      RMkrug
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJRHkX0AAoJENvXNx4PUvmCgDYH/jwOadmO1cpPAK2yNaCfldjm
> gzQ4wLf6o846xM8UQj78rIczvlycLqJP84jZe8kf8iHItFKSQbekpzujazIVEpcV
> TCcaiLbm9ex5qpnRVAH8VOph59acsnEjo67dztmBl+uPb30l4hmG/dwgUeJE7HrP
> oy+jtJZVostGzSiKV8wXv9C4Ohu9WWQ3Rw7VEGRKsAWcDfHGl79isEA5+ONbJjdz
> 32erpXBbCquJPFV4OGT7DqI8D/xh8dTVNK9ew/cdUjXlCysGAHUEQXRX2z+oxcJ5
> OIwNzCADjgM1/yIc5hCtTZtFIvFWo169vTgM2/0UDnpneJLHCrHFvuU94eo/6cI=
> =pJ7s
> -----END PGP SIGNATURE-----
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Remove site path from .libPaths

Rainer M Krug-6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 15/02/13 15:41, Duncan Murdoch wrote:

> On 13-02-15 9:28 AM, Rainer M Krug wrote: Hi
>
> I am sure I am missing something really basic, but I can't figure it out.
>
> I want to start R so that I can specify the location for the Library tree. In principel
> simple:
>
> As I only want it dependent on the directory I stat R in, I put a .Rprofile file in the
> directory.
>
> My default path is:
>
>>>> .libPaths()
> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15" [2] "/usr/lib/R/site-library" [3]
> "/usr/lib/R/library"
>>>>
>
> But I want to have it
>
>>>> .libPaths()
> [1] "/home/rkrug/THE_DIRECTORY/library" [2] "/usr/lib/R/library"
>>>>
>
> The first part is easy:
>
> .libPaths("/home/rkrug/THE_DIRECTORY/library")
>
> but how can I remove the site library?
>
> If I set
>
> In R 15.2 under Ubuntu, started with
>
> R --vanilla
>
>>>> .libPaths()
> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15" [2] "/usr/lib/R/site-library" [3]
> "/usr/lib/R/library"
>>>> .Library.site
> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>>>> .Library
> [1] "/usr/lib/R/library"
>>>> .Library.site <- "" .Library.site
> [1] ""
>>>> .libPaths()
> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15" [2] "/usr/lib/R/site-library" [3]
> "/usr/lib/R/library"
>>>> .libPaths("") .libPaths()
> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>>>> .Library
> [1] "/usr/lib/R/library"
>>>> .Library.site
> [1] ""
>>>>
>
>
>>>> .libPaths("") .libPaths()
> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>>>>
>
> even executing
>
>>>> .libPaths(.libPaths())
>
> does not change anything.
>
> Am I missing something or is there a bug in .libPaths()?
>
>> I don't think there is a bug.  As ?.libPaths says,
>
>> "Function .libPaths always uses the values of .Library and .Library.site in the base
>> namespace. .Library.site can be set by the site in ‘Rprofile.site’, which should be followed
>> by a call to .libPaths(.libPaths()) to make use of the updated value."
>
>> So you can't change the value of .Library.site after starting R.  You'll need to use
>> environment variables (as described on that page) to do it.


Thanks for the clarification - the use of the word "site" in "set by the site in ‘Rprofile.site’ "
was not clear to me. I thik it would be much clearer, if it states that the variables .Library and
.Library.site can not be changed while R is running although it looks as if they can be changed
(but then new ones in the top environment are created).

Now just one more question: where can I see that

.Library <- "/A/New/Existing/Directory"

has no impact?

I expected to see this in the code of .libPaths, but I didn't:

> .libPaths
function (new)
{
    if (!missing(new)) {
        new <- Sys.glob(path.expand(new))
        paths <- unique(normalizePath(c(new, .Library.site, .Library),
            "/"))
        .lib.loc <<- paths[file.info(paths)$isdir %in% TRUE]
    }
    else .lib.loc
}
<bytecode: 0x88e7640>
<environment: 0x88e685c>
>

Thanks,

Rainer



>
>> Duncan Murdoch
>
>
> Cheers,
>
> Rainer
>
>
>
>>
>> ______________________________________________ [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,
>> reproducible code.
>>
>

- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      [hidden email]

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRHkwmAAoJENvXNx4PUvmCnEcIAKPC2wxPWSX5Y/h5jfCg5b9g
OKsGsmL/0bu7MdfoMFKMdFL+TPQ1werGEgcKlmwUuZ/QGzd21BkN+C/Dl5gXSYRB
gHCGrQWUSemUlt+V2BTW1IaoksLhbj+QQBVNJ767eO5LkoIFujIwrCZ8o7upn/cy
6W3EhP+utHWz2C3+/gUR/c5FqPM6r4+9JiNVCxRzjCU/8/wip6dmoQRpZGXgAb8d
Koa5lRJlMUV0IMItMAoIIKzr1IkXaZ91VcTI1X13UTvzT7R/v5xgOnfJPEb5DRqI
clFGa8VaWx2RfmU6ihlmj8k8q4lOyI1hNXE6q8wX7aI3ERW4gSFCuDKASshyZXM=
=XGla
-----END PGP SIGNATURE-----

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Remove site path from .libPaths

Duncan Murdoch-2
On 13-02-15 9:54 AM, Rainer M Krug wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 15/02/13 15:41, Duncan Murdoch wrote:
>> On 13-02-15 9:28 AM, Rainer M Krug wrote: Hi
>>
>> I am sure I am missing something really basic, but I can't figure it out.
>>
>> I want to start R so that I can specify the location for the Library tree. In principel
>> simple:
>>
>> As I only want it dependent on the directory I stat R in, I put a .Rprofile file in the
>> directory.
>>
>> My default path is:
>>
>>>>> .libPaths()
>> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15" [2] "/usr/lib/R/site-library" [3]
>> "/usr/lib/R/library"
>>>>>
>>
>> But I want to have it
>>
>>>>> .libPaths()
>> [1] "/home/rkrug/THE_DIRECTORY/library" [2] "/usr/lib/R/library"
>>>>>
>>
>> The first part is easy:
>>
>> .libPaths("/home/rkrug/THE_DIRECTORY/library")
>>
>> but how can I remove the site library?
>>
>> If I set
>>
>> In R 15.2 under Ubuntu, started with
>>
>> R --vanilla
>>
>>>>> .libPaths()
>> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15" [2] "/usr/lib/R/site-library" [3]
>> "/usr/lib/R/library"
>>>>> .Library.site
>> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>>>>> .Library
>> [1] "/usr/lib/R/library"
>>>>> .Library.site <- "" .Library.site
>> [1] ""
>>>>> .libPaths()
>> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15" [2] "/usr/lib/R/site-library" [3]
>> "/usr/lib/R/library"
>>>>> .libPaths("") .libPaths()
>> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>>>>> .Library
>> [1] "/usr/lib/R/library"
>>>>> .Library.site
>> [1] ""
>>>>>
>>
>>
>>>>> .libPaths("") .libPaths()
>> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>>>>>
>>
>> even executing
>>
>>>>> .libPaths(.libPaths())
>>
>> does not change anything.
>>
>> Am I missing something or is there a bug in .libPaths()?
>>
>>> I don't think there is a bug.  As ?.libPaths says,
>>
>>> "Function .libPaths always uses the values of .Library and .Library.site in the base
>>> namespace. .Library.site can be set by the site in ‘Rprofile.site’, which should be followed
>>> by a call to .libPaths(.libPaths()) to make use of the updated value."
>>
>>> So you can't change the value of .Library.site after starting R.  You'll need to use
>>> environment variables (as described on that page) to do it.
>
>
> Thanks for the clarification - the use of the word "site" in "set by the site in ‘Rprofile.site’ "
> was not clear to me. I thik it would be much clearer, if it states that the variables .Library and
> .Library.site can not be changed while R is running although it looks as if they can be changed
> (but then new ones in the top environment are created).
>
> Now just one more question: where can I see that
>
> .Library <- "/A/New/Existing/Directory"
>
> has no impact?

If you look at environment(.libPaths) you'll see that it is not
.GlobalEnv, so the .lib.loc assignment might not happen where you think.
  Indeed,

ls(environment(.libPaths), all=TRUE)

will show that it contains one object, .lib.loc.  You can modify that
variable, but it's quite a risky (in the sense of being undocumented and
unsupported) thing to do.

Duncan Murdoch

>
> I expected to see this in the code of .libPaths, but I didn't:
>
>> .libPaths
> function (new)
> {
>      if (!missing(new)) {
>          new <- Sys.glob(path.expand(new))
>          paths <- unique(normalizePath(c(new, .Library.site, .Library),
>              "/"))
>          .lib.loc <<- paths[file.info(paths)$isdir %in% TRUE]
>      }
>      else .lib.loc
> }
> <bytecode: 0x88e7640>
> <environment: 0x88e685c>
>>
>
> Thanks,
>
> Rainer
>
>
>
>>
>>> Duncan Murdoch
>>
>>
>> Cheers,
>>
>> Rainer
>>
>>
>>
>>>
>>> ______________________________________________ [hidden email] mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,
>>> reproducible code.
>>>
>>
>
> - --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
> (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel :       +33 - (0)9 53 10 27 44
> Cell:       +33 - (0)6 85 62 59 98
> Fax :       +33 - (0)9 58 10 27 44
>
> Fax (D):    +49 - (0)3 21 21 25 22 44
>
> email:      [hidden email]
>
> Skype:      RMkrug
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJRHkwmAAoJENvXNx4PUvmCnEcIAKPC2wxPWSX5Y/h5jfCg5b9g
> OKsGsmL/0bu7MdfoMFKMdFL+TPQ1werGEgcKlmwUuZ/QGzd21BkN+C/Dl5gXSYRB
> gHCGrQWUSemUlt+V2BTW1IaoksLhbj+QQBVNJ767eO5LkoIFujIwrCZ8o7upn/cy
> 6W3EhP+utHWz2C3+/gUR/c5FqPM6r4+9JiNVCxRzjCU/8/wip6dmoQRpZGXgAb8d
> Koa5lRJlMUV0IMItMAoIIKzr1IkXaZ91VcTI1X13UTvzT7R/v5xgOnfJPEb5DRqI
> clFGa8VaWx2RfmU6ihlmj8k8q4lOyI1hNXE6q8wX7aI3ERW4gSFCuDKASshyZXM=
> =XGla
> -----END PGP SIGNATURE-----
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Remove site path from .libPaths

Rainer M Krug-6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 15/02/13 16:06, Duncan Murdoch wrote:

> On 13-02-15 9:54 AM, Rainer M Krug wrote: On 15/02/13 15:41, Duncan Murdoch wrote:
>>>> On 13-02-15 9:28 AM, Rainer M Krug wrote: Hi
>>>>
>>>> I am sure I am missing something really basic, but I can't figure it out.
>>>>
>>>> I want to start R so that I can specify the location for the Library tree. In principel
>>>> simple:
>>>>
>>>> As I only want it dependent on the directory I stat R in, I put a .Rprofile file in the
>>>> directory.
>>>>
>>>> My default path is:
>>>>
>>>>>>> .libPaths()
>>>> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15" [2] "/usr/lib/R/site-library" [3]
>>>> "/usr/lib/R/library"
>>>>>>>
>>>>
>>>> But I want to have it
>>>>
>>>>>>> .libPaths()
>>>> [1] "/home/rkrug/THE_DIRECTORY/library" [2] "/usr/lib/R/library"
>>>>>>>
>>>>
>>>> The first part is easy:
>>>>
>>>> .libPaths("/home/rkrug/THE_DIRECTORY/library")
>>>>
>>>> but how can I remove the site library?
>>>>
>>>> If I set
>>>>
>>>> In R 15.2 under Ubuntu, started with
>>>>
>>>> R --vanilla
>>>>
>>>>>>> .libPaths()
>>>> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15" [2] "/usr/lib/R/site-library" [3]
>>>> "/usr/lib/R/library"
>>>>>>> .Library.site
>>>> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>>>>>>> .Library
>>>> [1] "/usr/lib/R/library"
>>>>>>> .Library.site <- "" .Library.site
>>>> [1] ""
>>>>>>> .libPaths()
>>>> [1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15" [2] "/usr/lib/R/site-library" [3]
>>>> "/usr/lib/R/library"
>>>>>>> .libPaths("") .libPaths()
>>>> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>>>>>>> .Library
>>>> [1] "/usr/lib/R/library"
>>>>>>> .Library.site
>>>> [1] ""
>>>>>>>
>>>>
>>>>
>>>>>>> .libPaths("") .libPaths()
>>>> [1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>>>>>>>
>>>>
>>>> even executing
>>>>
>>>>>>> .libPaths(.libPaths())
>>>>
>>>> does not change anything.
>>>>
>>>> Am I missing something or is there a bug in .libPaths()?
>>>>
>>>>> I don't think there is a bug.  As ?.libPaths says,
>>>>
>>>>> "Function .libPaths always uses the values of .Library and .Library.site in the base
>>>>> namespace. .Library.site can be set by the site in ‘Rprofile.site’, which should be
>>>>> followed by a call to .libPaths(.libPaths()) to make use of the updated value."
>>>>
>>>>> So you can't change the value of .Library.site after starting R.  You'll need to use
>>>>> environment variables (as described on that page) to do it.
>
>
> Thanks for the clarification - the use of the word "site" in "set by the site in
> ‘Rprofile.site’ " was not clear to me. I thik it would be much clearer, if it states that the
> variables .Library and .Library.site can not be changed while R is running although it looks as
> if they can be changed (but then new ones in the top environment are created).
>
> Now just one more question: where can I see that
>
> .Library <- "/A/New/Existing/Directory"
>
> has no impact?
>
>> If you look at environment(.libPaths) you'll see that it is not .GlobalEnv, so the .lib.loc
>> assignment might not happen where you think.  Indeed,
>
>> ls(environment(.libPaths), all=TRUE)
>
>> will show that it contains one object, .lib.loc.  You can modify that variable, but it's
>> quite a risky (in the sense of being undocumented and unsupported) thing to do.

Ok, thanks for the clarification, and agreed that it is not advisable. I will then go a different
route and start R with given Environmental variables.
Thanks  lot,

Rainer


>
>> Duncan Murdoch
>
>
> I expected to see this in the code of .libPaths, but I didn't:
>
>>>> .libPaths
> function (new) { if (!missing(new)) { new <- Sys.glob(path.expand(new)) paths <-
> unique(normalizePath(c(new, .Library.site, .Library), "/")) .lib.loc <<-
> paths[file.info(paths)$isdir %in% TRUE] } else .lib.loc } <bytecode: 0x88e7640> <environment:
> 0x88e685c>
>>>>
>
> Thanks,
>
> Rainer
>
>
>
>>>>
>>>>> Duncan Murdoch
>>>>
>>>>
>>>> Cheers,
>>>>
>>>> Rainer
>>>>
>>>>
>>>>
>>>>>
>>>>> ______________________________________________ [hidden email] mailing list
>>>>> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide
>>>>> http://www.R-project.org/posting-guide.html and provide commented, minimal,
>>>>> self-contained, reproducible code.
>>>>>
>>>>
>
>>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRHlgpAAoJENvXNx4PUvmCel0H/jJ0KYNfEryzjnSIt9U9xrk/
cEgnFLRAzoWuBaMvTuPVthiOHIjIPWyiauoZtn9Vju6HALBQAY9h7SWpwMyVIm6y
VwHsRZ3Szbn1kRPkIbHpZFlMHtfFg9I9KlSywBPHjD1FVEUI8TXJSz4padjbmSWc
VHRK88o2YHNAA6ss7AyGjpXuFxwIvCNjxTVitPdaMBqnmoJtO3jIOgcPAp18pLlK
uYv1pvcVKY6yizNwwneMhIO0dqmZMIjL/TT6Z8IT2K7EUOqEtWXQ2DhSFOFBtYGi
olae3hK9I8FI+wS5oD7i86PUNPB8KDya3KnGk1USEKF69nesRbWXU3fuC6BaI+A=
=t0Hg
-----END PGP SIGNATURE-----

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.