[Rd] R Wish List
Gabor Grothendieck
ggrothendieck at gmail.com
Fri Jan 1 14:36:49 CET 2010
This is my 2010 Wish list for R. Most of these have been discussed on
r-help or r-devel already so this is more of a wrap-up. The first 4
relate to R itself, the next 2 to the R environment and the last 4
relate to using R with other languages:
R
1. Strings. Some way of placing backslashes in literal strings without
escaping them. This is useful for latex, regular expressions and
Windows filepaths. C# and scripting languages such as Ruby, python,
perl, etc. have various ways to handle this which might be used as a
model. Also related to this is a way of having both single and double
quotes within a string without escaping either.
2. read.table
a. read.table allows double quotes arround numerics if colClasses is
not specified but if colClasses = "numeric" then it does not. There
should be some easy way to specify the default behavior when
colClasses is specified.
b. argument to specify how many rows read.table uses to establish
the column classes. All rows, i.e. Inf, should be a possible option
(i.e. entire file passed through twice).
3. support png(con), pdf(con), etc. where con is a connection to be written to.
4.Cross Platform Consistency. Improve consistency of R across platforms:
a. provide analog of Windows R gui Paste Commands Only menu on other platforms
b. support "clipboard" as in readLines("clipboard") on Mac
c. shell command works on Windows, check if its available on other platforms
d. other?
R ENVIRONMENT
5. Installation. When installing R version x.y.z, a new directory
should be created only if x or y changes but if z changes then the
default action should be to overwrite the existing x.y.z version. This
would simplify the configuration of R on disk by having fewer nearly
identical versions and is also consistent with how win-library already
works. The current scheme of a separate tree for each z level version
would still be possible by selecting a custom installation but would
not be the default.
6. Documentation. demo files and non-Sweave pdf documents should be listed in
- help(package = myPkg)
- CRAN page for myPkg
These would be useful even if they are not in the form of links so the
reader could get a global view of what is available.
SCRIPTING/OTHER LANGUAGES
7. -x argument which works similar to the same argument in
Perl/Python/Ruby to allow a batch file and an R file to be combined.
For example:
python -x prog.py skips first line of prog.py allowing
non-UNIX forms of #!cmd
perl -x prog.pl or perl -xdir prog.pl strips off text
before !#perl line and possibly cd's to directory (if one is given).
ruby works same way.
Thus one could write:
Rscript -x myfile.bat
and combine a Windows batch file and an R file into myfile.bat, say.
8. tcltk
a. some easy way to run R minimized but have a tcltk GUI not
minimized (i.e. without having to write a frontend in C)
b. ability to load tcl without loading tk
9. provide packages like tcltk for the other popular scripting
languages: perl, python, ruby. It would be sufficient that there is a
package that contains the scripting language executable so an R
package that uses perl, say, could simply list such a package for perl
in Depends: in DESCRIPTION file and thereby be sure that perl were
available. They could then access it via:
perlcmd <- if (.Platform$OS == "windows") "perl.exe" else "perl"
perl <- system.file(perlcmd, package = "perl")
cmd <- paste(perl, my_command)
system(cmd)
An actual interface to R, as in tcltk, while nice to have is not an
essential part of this and could be omitted to make this easier to
accomplish.
10. eliminate dependence of R on perl (this seems to be occurring or
maybe its already happened). For those packages needing perl they
could rely on #9 if it were available.
More information about the R-devel
mailing list