[R] Question

Jeff Newmiller jdnewmil @ending from dcn@d@vi@@c@@u@
Tue Jan 8 20:48:57 CET 2019


Er, just keep it simple, Marc... give one option:

library(lattice)

If you _ever_ use require() without acting upon the return value then you are setting yourself or someone else up for confusing missing objects errors someday for no good reason. This _isn't_ just personal preference... by choosing to use the require function you are taking responsibility for the case where that package is missing, and by ignoring the return value you are immediately abdicating that responsibility. Let the error appear where it makes sense by using the library function in the first place.

On January 8, 2019 10:56:57 AM PST, Marc Schwartz via R-help <r-help using r-project.org> wrote:
>Guys,
>
>lattice is a "recommended" package, which means that it is installed by
>default with any standard R installation.
>
>Thus, all that is required, as Sarah noted in an earlier reply, is
>either:
>
>  library(lattice)
>
>or 
>
>  require(lattice)
>
>depending upon preference.
>
>latticeExtra, on the other hand, is a third party package that would
>need to be installed separately, if desired.
>
>Regards,
>
>Marc Schwartz
>
>
>> On Jan 8, 2019, at 1:46 PM, Bert Gunter <bgunter.4567 using gmail.com>
>wrote:
>> 
>> I think it's ?install.packages
>> 
>> Bert Gunter
>> 
>> "The trouble with having an open mind is that people keep coming
>along and
>> sticking things into it."
>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>> 
>> 
>> On Tue, Jan 8, 2019 at 9:50 AM Rich Shepard
><rshepard using appl-ecosys.com>
>> wrote:
>> 
>>> On Tue, 8 Jan 2019, S. Mahmoud Nasrollahi wrote:
>>> 
>>>> I have got a problem during working with some package in R and in
>spite
>>> of
>>>> trying with R help, internet and any other resources I could not
>succeed.
>>>> Indeed when I what to install some function like bwplot, boxplot,
>xyplot
>>> I
>>>> receive this sort of messages: Warning in install.packages :
>package
>>>> ‘xyplot’ is not available (for R version 3.5.2) Do you know how I
>can
>>>> solve that?
>>> 
>>>   Yep. Those plots are part of the lattice package. You can install
>>> lattice
>>> (and latticeExtra if you want) with
>>> 
>>>> installpkg("lattice")
>>> 
>>> Happy plotting,
>>> 
>>> Rich
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list