How to unload a package or "undo" library("package")

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

How to unload a package or "undo" library("package")

Aleš Žiberna-3
Hello!

I would like to unload a package form a current R session. I tried
datach(package:packagename), however it does not work. The reason I want to
unload it is that I want to correct some files in the package and reinstall
it without closing an R session.

Best,
Ales Ziberna

PS: I am using R 2.1.1 on Windows XP

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: How to unload a package or "undo" library("package")

Gabor Grothendieck
Here are some things to try:

detach() - detach most recent attached package
detach(2) - detach package which is in position 2 on search list.
Same as detach()
detach("package:mypackage") - mypackage from search list
search() - display search list

On 1/8/06, Aleš Žiberna <[hidden email]> wrote:

> Hello!
>
> I would like to unload a package form a current R session. I tried
> datach(package:packagename), however it does not work. The reason I want to
> unload it is that I want to correct some files in the package and reinstall
> it without closing an R session.
>
> Best,
> Ales Ziberna
>
> PS: I am using R 2.1.1 on Windows XP
>
> ______________________________________________
> [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
>

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: How to unload a package or "undo" library("package")

Ales Ziberna-2
If I do  detach(package:blockmodeling)

My package "blockmodeling" does not appear in (.packages())
[1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
[7] "base"  

However, if I want to install a newer version from a local zip file, I get:
utils:::menuInstallLocal()
package 'blockmodeling' successfully unpacked and MD5 sums checked
Error: cannot remove prior installation of package 'blockmodeling'


Is there any way around that?

Best,
Ales Ziberna

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Gabor Grothendieck
Sent: Sunday, January 08, 2006 10:42 PM
To: Aleš Žiberna
Cc: [hidden email]
Subject: Re: [R] How to unload a package or "undo" library("package")

Here are some things to try:

detach() - detach most recent attached package
detach(2) - detach package which is in position 2 on search list.
Same as detach()
detach("package:mypackage") - mypackage from search list
search() - display search list

On 1/8/06, Aleš Žiberna <[hidden email]> wrote:

> Hello!
>
> I would like to unload a package form a current R session. I tried
> datach(package:packagename), however it does not work. The reason I
> want to unload it is that I want to correct some files in the package
> and reinstall it without closing an R session.
>
> Best,
> Ales Ziberna
>
> PS: I am using R 2.1.1 on Windows XP
>
> ______________________________________________
> [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
>

______________________________________________
[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

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: How to unload a package or "undo" library("package")

Brian Ripley
See the rw-FAQ, Q4.8

On Mon, 9 Jan 2006, Ales Ziberna wrote:

> If I do  detach(package:blockmodeling)
>
> My package "blockmodeling" does not appear in (.packages())
> [1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
> [7] "base"
>
> However, if I want to install a newer version from a local zip file, I get:
> utils:::menuInstallLocal()
> package 'blockmodeling' successfully unpacked and MD5 sums checked
> Error: cannot remove prior installation of package 'blockmodeling'
>
>
> Is there any way around that?
>
> Best,
> Ales Ziberna
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Gabor Grothendieck
> Sent: Sunday, January 08, 2006 10:42 PM
> To: Alea }iberna
> Cc: [hidden email]
> Subject: Re: [R] How to unload a package or "undo" library("package")
>
> Here are some things to try:
>
> detach() - detach most recent attached package
> detach(2) - detach package which is in position 2 on search list.
> Same as detach()
> detach("package:mypackage") - mypackage from search list
> search() - display search list
>
> On 1/8/06, Alea }iberna <[hidden email]> wrote:
>> Hello!
>>
>> I would like to unload a package form a current R session. I tried
>> datach(package:packagename), however it does not work. The reason I
>> want to unload it is that I want to correct some files in the package
>> and reinstall it without closing an R session.
>>
>> Best,
>> Ales Ziberna
>>
>> PS: I am using R 2.1.1 on Windows XP
>>
>> ______________________________________________
>> [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
>>
>
> ______________________________________________
> [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
>
> ______________________________________________
> [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
>

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[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
Reply | Threaded
Open this post in threaded view
|

Re: How to unload a package or "undo" library("package")

Ales Ziberna-2
Thank you!

I guess it can not be done!


Best,
Ales Ziberna

-----Original Message-----
From: Prof Brian Ripley [mailto:[hidden email]]
Sent: Monday, January 09, 2006 9:19 AM
To: Ales Ziberna
Cc: [hidden email]
Subject: Re: [R] How to unload a package or "undo" library("package")

See the rw-FAQ, Q4.8

On Mon, 9 Jan 2006, Ales Ziberna wrote:

> If I do  detach(package:blockmodeling)
>
> My package "blockmodeling" does not appear in (.packages())
> [1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
> [7] "base"
>
> However, if I want to install a newer version from a local zip file, I
get:

> utils:::menuInstallLocal()
> package 'blockmodeling' successfully unpacked and MD5 sums checked
> Error: cannot remove prior installation of package 'blockmodeling'
>
>
> Is there any way around that?
>
> Best,
> Ales Ziberna
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Gabor
> Grothendieck
> Sent: Sunday, January 08, 2006 10:42 PM
> To: Alea }iberna
> Cc: [hidden email]
> Subject: Re: [R] How to unload a package or "undo" library("package")
>
> Here are some things to try:
>
> detach() - detach most recent attached package
> detach(2) - detach package which is in position 2 on search list.
> Same as detach()
> detach("package:mypackage") - mypackage from search list
> search() - display search list
>
> On 1/8/06, Alea }iberna <[hidden email]> wrote:
>> Hello!
>>
>> I would like to unload a package form a current R session. I tried
>> datach(package:packagename), however it does not work. The reason I
>> want to unload it is that I want to correct some files in the package
>> and reinstall it without closing an R session.
>>
>> Best,
>> Ales Ziberna
>>
>> PS: I am using R 2.1.1 on Windows XP
>>
>> ______________________________________________
>> [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
>>
>
> ______________________________________________
> [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
>
> ______________________________________________
> [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
>

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[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