[R-sig-dyn-mod] error attaching package deSolve

Julien Lavenus julien.lavenus at ips.unibe.ch
Fri Jan 8 16:42:17 CET 2016


Dear Darin,

The package graphics is already loaded and attached when you start R. 
Because both packages contain an object called matplot, when you load 
deSolve, R re-associate the object name "matplot" with the matplot 
object from deSolve (matplot = deSolve::matplot). Therefore the matplot 
object from graphics (graphics::matplot) is not directly accessible 
anymore through the name matplot.

The library() function does not reload a namespace which is already 
loaded. Because the namespace of graphics is already loaded when you 
start R, it is not reloaded when you do library(graphics). This is why 
nothing happens when you do library(graphics).

Hope it helps.
Best,

Julien



On 08/01/16 16:30, Darin Perusich wrote:
> Hello All,
>
> Please bear with me, I'm a systems administrator helping an end user
> troubleshoot a problem.
>
> When attempting to load the deSolve library it's failing with the
> message 'The following object is masked from ‘package:graphics’:
> matplot', however the graphics library is loaded, (.packages()) lists
> it, see my output below. However if I manually load graphics and then
> deSolve it's loads without issue.
>
> Can anyone shed some light as to what might be causing this?
>
> R-base 3.2.2
> deSolve 1.13-1 installed via install.packages("deSolve",
> repos="http://R-Forge.R-project.org")
>
> The output that I'm seeing...
>
> linux-4on9:~> R
>
> R version 3.2.2 (2015-08-14) -- "Fire Safety"
> Copyright (C) 2015 The R Foundation for Statistical Computing
> Platform: x86_64-suse-linux-gnu (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
>    Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> (.packages())
> [1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  "methods"
> [7] "base"
>> library('deSolve')
> Attaching package: ‘deSolve’
>
> The following object is masked from ‘package:graphics’:
>
>      matplot
>
>> library('graphics')
>> library('deSolve')
> --
> Later,
> Darin
>
> _______________________________________________
> R-sig-dynamic-models mailing list
> R-sig-dynamic-models at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-dynamic-models

-- 

Dr. Julien Lavenus
Post-doc in Pr. Cris Kuhlemeier's lab
University of Bern
Institute of Plant Sciences
Alterbergrain 21
3006 Bern
Switzerland

Tel: + 41 31 631 4965



More information about the R-sig-dynamic-models mailing list