[Rd] Improvement to documentation in dput.Rd

Korpela Mikko (MML) mikko@korpel@ @ending from m@@nmitt@u@l@ito@@fi
Sat Sep 29 08:49:25 CEST 2018


If the "Matrix" package is attached, 'example(dget)' fails:

  > library(Matrix)
  > example(dget)
  
  dget> fil <- tempfile()
  
  dget> ## Write an ASCII version of function mean to our temp file
  dget> dput(mean, fil)

  dget> ## And read it back into 'bar'
  dget> bar <- dget(fil)
  Error in initialize(value, ...) : '...' used in an incorrect context

A possible fix would be to use 'dput(base::mean, fil)' instead of
'dput(mean, fil)' in src/library/base/man/dput.Rd .

-- 
Mikko Korpela



More information about the R-devel mailing list