[R] Help with packages (methods, stats, stats4)

David Winsemius dwinsemius at comcast.net
Fri Jan 12 21:51:34 CET 2018


> On Jan 12, 2018, at 12:01 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> 
> On 12/01/2018 1:25 PM, Karim Mezhoud wrote:
>> Yes,
>> You are right. I mean
>> install.packages('DVstats').
> 
> That won't work either, because DVstats is not on CRAN.
> 
>> Actually, it seems that DVstats does not have maintainer
>> https://github.com/USGS-R/DVstats
> 
> You can try
> 
> install.packages("devtools")  # if not already installed...
> devtools::install_github("USGS-R/DVstats")
> 
> 
> but that fails for me, with this message:
> 
> ERROR: dependencies ‘smwrBase’, ‘smwrGraphs’, ‘smwrStats’, ‘smwrQW’ are not available for package ‘DVstats’
> 
> It doesn't look promising.

If you read the Instructions linked from https://github.com/USGS-R/smwrBase you find that the USGS maintains a repository which they expect one to add to your repo-list. Read:

https://owi.usgs.gov/R/training-curriculum/installr/

....

rprofile_path = file.path(Sys.getenv("HOME"), ".Rprofile"
)
write(
'\noptions(repos=c(getOption(\'repos\
'),
    CRAN=\'
https://cloud.r-project.org\
',
    USGS=\'
https://owi.usgs.gov/R\'))\n'
,
      rprofile_path, 
      append =  TRUE)

cat(
'Your Rprofile has been updated to include GRAN.
    Please restart R for changes to take effect.'
)

They do have a misleading statement at the end of that page regarding the MacOS. It's true that Rtools are not needed for package development, but a casual reader could well conclude that meant no package development ancillary programs were needed. They _should_ have said that Apple's XCode of the proper version as well as the Command Line Tools were needed for package development on MacOS/OSX. I do have those installed. When I attempted installation I got partial success with:

install.packages(c('smwrBase', 'smwrGraphs', 'smwrStats', 'smwrQW'), repo='https://owi.usgs.gov/R/', type="source")

# However the lack of zCompositions (a CRAN package) initially prevented installation of smwrQW
# once  that dependency was installed I was able to install smwrQW and DVstats

install.packages( 'smwrQW', repo='https://owi.usgs.gov/R/', type="source")
install.packages( 'DVstats', repo='https://owi.usgs.gov/R/', type="source")

#resulting in...

> library(DVstats)
This information is preliminary or provisional and
is subject to revision. It is being provided to meet
the need for timely best science. The information
has not received final approval by the U.S. Geological
Survey (USGS) and is provided on the condition that
neither the USGS nor the U.S. Government shall be held
liable for any damages resulting from the authorized
or unauthorized use of the information.
                        
****Orphaned Package****
This package is looking for a new maintainer. For more information, 
see: https://owi.usgs.gov/R/packages.html#orphan



> 
> Duncan Murdoch
> 
>> Karim
>> On Fri, Jan 12, 2018 at 7:20 PM, Duncan Murdoch <murdoch.duncan at gmail.com>
>> wrote:
>>> On 12/01/2018 1:11 PM, Karim Mezhoud wrote:
>>> 
>>>> Hi,
>>>> Did you try install.packages('stats').
>>>> 
>>> 
>>> That will not work, as stats is a base package.  It comes with R, and
>>> can't be changed.  The stats package should never be missing in a proper
>>> install of R.
>>> 
>>> Duncan Murdoch
>>> 
>>> 
>>> Let we know about your   Sys.info()
>>>> Karim
>>>> 
>>>> On Fri, Jan 12, 2018 at 5:37 PM, imane hajar <imane.chafiki.fst at gmail.com
>>>>> 
>>>> wrote:
>>>> 
>>>> hello ,
>>>>> 
>>>>> i am so sorry , i figure it out.
>>>>> 
>>>>> im sending this msj to the moderator to stop the approval of the mail .
>>>>> 
>>>>> have a good day.
>>>>> 
>>>>> 
>>>>> 2018-01-12 15:42 GMT+00:00 imane hajar <imane.chafiki.fst at gmail.com>:
>>>>> 
>>>>> hello,
>>>>>> Can you please give me a hand with this problem,well i can't install
>>>>>> these packages:
>>>>>> - stats
>>>>>> - methods
>>>>>> - stats4
>>>>>> 
>>>>>> when i tried the following command :  *library(help = "stats") * , it
>>>>>> gave me this output (*see picture*), so i contacted the Maintainer of
>>>>>> the
>>>>>> package at (*R-core at r-project.org <R-core at r-project.org>*) but he said
>>>>>> that i write to the wrong place.
>>>>>> 
>>>>>> (i want to install those packages in order to use the "DVstats" package)
>>>>>> 
>>>>>> (i have the latest version of R (3.4.3 ) and Rstudio(1.2.240) )
>>>>>> 
>>>>>> thank you
>>>>>> Regards
>>>>>> 
>>>>>> 
>>>>>          [[alternative HTML version deleted]]
>>>>> 
>>>>> ______________________________________________
>>>>> R-help at 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.
>>>>> 
>>>>> 
>>>>         [[alternative HTML version deleted]]
>>>> 
>>>> ______________________________________________
>>>> R-help at 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/posti
>>>> ng-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>> 
>>>> 
>>> 
>> 
> 
> ______________________________________________
> R-help at 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.

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   -Gehm's Corollary to Clarke's Third Law



More information about the R-help mailing list