Hi all, Is there any chance that readRDS and saveRDS might one day become read.rds and write.rds? That would make them more consistent with the other reading and writing functions. Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/
I'd second this. Though my thinking was to add writeRDS instead of saveRDS. Jeff On Tue, Oct 18, 2011 at 8:37 AM, Hadley Wickham <hadley at rice.edu> wrote:> Hi all, > > Is there any chance that readRDS and saveRDS might one day become > read.rds and write.rds? ?That would make them more consistent with the > other reading and writing functions. > > Hadley > > -- > Assistant Professor / Dobelman Family Junior Chair > Department of Statistics / Rice University > http://had.co.nz/ > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Jeffrey Ryan jeffrey.ryan at lemnica.com www.lemnica.com www.esotericR.com
On 18/10/2011 9:37 AM, Hadley Wickham wrote:> Hi all, > > Is there any chance that readRDS and saveRDS might one day become > read.rds and write.rds? That would make them more consistent with the > other reading and writing functions.Ending names in .foo is a bad idea because of the S3 naming conventions, so I think this is unlikely. But you can always create an alias yourself... Duncan Murdoch
>> Is there any chance that readRDS and saveRDS might one day become >> read.rds and write.rds? ?That would make them more consistent with the >> other reading and writing functions. > > Ending names in .foo is a bad idea because of the S3 naming conventions, so > I think this is unlikely. ?But you can always create an alias yourself...It just makes teaching that much harder. We have the pairs: * read.csv and write.csv * load and save * readRDS and saveRDS Even loadRDS/saveRDS or readRDS/writeRDS would be better than the current combo. Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/
As load involves a side-effect, I would think that loadRDS is a bad idea. That said, read/write is far more consistent across all languages and internally with R than read/save is. My (worthless) vote is for writeRDS. Jeff On Tue, Oct 18, 2011 at 11:37 AM, Hadley Wickham <hadley at rice.edu> wrote:>>> Is there any chance that readRDS and saveRDS might one day become >>> read.rds and write.rds? ?That would make them more consistent with the >>> other reading and writing functions. >> >> Ending names in .foo is a bad idea because of the S3 naming conventions, so >> I think this is unlikely. ?But you can always create an alias yourself... > > It just makes teaching that much harder. ?We have the pairs: > > * read.csv and write.csv > * load and save > * readRDS and saveRDS > > Even loadRDS/saveRDS or readRDS/writeRDS would be better than the current combo. > > Hadley > > -- > Assistant Professor / Dobelman Family Junior Chair > Department of Statistics / Rice University > http://had.co.nz/ > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Jeffrey Ryan jeffrey.ryan at lemnica.com www.lemnica.com www.esotericR.com
On Tue, 2011-10-18 at 08:37 -0500, Hadley Wickham wrote:> Hi all, > > Is there any chance that readRDS and saveRDS might one day become > read.rds and write.rds? That would make them more consistent with the > other reading and writing functions. > > Hadley >I would hope not. Those would then look like S3 methods for class "rds" and cause confusion of a different sort. It would be better to make the existing read.foo and write.foo functions drop their "." but that is unlikely to happen given all the code that would inevitably break. G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
On Tue, 18 Oct 2011, Hadley Wickham wrote:> * read.csv and write.csv > * load and save > * readRDS and saveRDS > > Even loadRDS/saveRDS or readRDS/writeRDS would be better than the current combo.You could change the CSV functions to readCSV and writeCSV :)
On Tue, Oct 18, 2011 at 9:34 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:> On 18/10/2011 9:37 AM, Hadley Wickham wrote: >> >> Hi all, >> >> Is there any chance that readRDS and saveRDS might one day become >> read.rds and write.rds? ?That would make them more consistent with the >> other reading and writing functions. > > Ending names in .foo is a bad idea because of the S3 naming conventions, so > I think this is unlikely. ?But you can always create an alias yourself...I always thought that S3 was part of the reason for read.ext write.ext. In: "/path/file.ext" the "class" of the file is "ext". I kind of like the idea of taking this farther, generic functions read/write dispatch to the appropriate method depending on the class of the file. Generally, only read/write would be used, specifying the specific method as needed. read.rda and write.rda could replace load/save where: dat <- read.rda() would create an environment, dat rather than simply loading them into the global environment. Though this is more of a hypothetical situation than a suggestion for change.> > Duncan Murdoch > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Joshua Wiley Ph.D. Student, Health Psychology Programmer Analyst II, ATS Statistical Consulting Group University of California, Los Angeles https://joshuawiley.com/
Hadley, Any chance of changing fun.aggregate to FUN and value_var to value.var? aggregate(.., FUN, ...) acast(..., fun.aggregate, ...) cast(..., value.var) acast(..., value_var) Side note: My fantasy for R 3.0 would be to fix the obvious inconsistencies in function names/arguments, use Roxygen format for the documentation, change the egregious [ , , drop=TRUE] to FALSE and paste(..., sep=""), install packages on the fly, and improve consistency for functions dealing with colors (hex, 0-1, 0-255, etc). Kevin On Tue, Oct 18, 2011 at 8:37 AM, Hadley Wickham <hadley@rice.edu> wrote:> Hi all, > > Is there any chance that readRDS and saveRDS might one day become > read.rds and write.rds? That would make them more consistent with the > other reading and writing functions. > > Hadley > > -- > Assistant Professor / Dobelman Family Junior Chair > Department of Statistics / Rice University > http://had.co.nz/ > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]
On 11-10-18 04:00 PM, Kevin Wright wrote:> Hadley, > > Any chance of changing fun.aggregate to FUN and value_var to value.var? > > aggregate(.., FUN, ...) > acast(..., fun.aggregate, ...) > > cast(..., value.var) > acast(..., value_var) > > Side note: My fantasy for R 3.0 would be to fix the obvious inconsistencies > in function names/arguments, use Roxygen format for the documentation, > change the egregious [ , , drop=TRUE] to FALSE and paste(..., sep=""), > install packages on the fly, and improve consistency for functions dealing > with colors (hex, 0-1, 0-255, etc).Sounds like a dream ;-) Please add to that list dropping the stringsAsFactors "feature" and fixing c(factor(c("a", "b")), factor(c("c", "a"))). Thanks! H.> > Kevin > > > On Tue, Oct 18, 2011 at 8:37 AM, Hadley Wickham<hadley at rice.edu> wrote: > >> Hi all, >> >> Is there any chance that readRDS and saveRDS might one day become >> read.rds and write.rds? That would make them more consistent with the >> other reading and writing functions. >> >> Hadley >> >> -- >> Assistant Professor / Dobelman Family Junior Chair >> Department of Statistics / Rice University >> http://had.co.nz/ >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- Herv? Pag?s Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpages at fhcrc.org Phone: (206) 667-5791 Fax: (206) 667-1319
Possibly Parallel Threads
- recordPlot/replayPlot not working with saveRDS/readRDS
- Risk of readRDS() not detecting race conditions with parallel saveRDS()?
- [FORGED] recordPlot/replayPlot not working with saveRDS/readRDS
- readRDS, In as.double.xts(fishReport$count) : NAs introduced by coercion
- How to benchmark speed of load/readRDS correctly