[Rd] data.frame() args in transform()

2012-10-29 Thread Ken Williams
Starting in SVN revision 47035 (which shows up in the R-2-9-0 line), 
transform.data.frame() started accepting arguments like 'row.names' and 
'stringsAsFactors' to be passed through to the data.frame() function.  It looks 
like this was an unintentional side-effect of letting multiple columns be added 
properly.

Given that this has been implemented for quite a while, should it now be 
documented?  It's a little strange to support it though - the 
'stringsAsFactors' argument might be handy, but 'check.names', 'row.names', and 
'check.rows' are perhaps questionable.  If it's desirable to document the 
behavior, here's a possible patch.

-
Index: src/library/base/man/transform.Rd
===
--- src/library/base/man/transform.Rd  (revision 61043)
+++ src/library/base/man/transform.Rd   (working copy)
@@ -27,6 +27,10 @@
   \code{_data}.  The tags are matched against \code{names(_data)}, and for
   those that match, the value replace the corresponding variable in
   \code{_data}, and the others are appended to \code{_data}.
+
+  \code{transform.data.frame} also accepts the additional named
+  arguments that the \code{data.frame} function accepts,
+  e.g. \code{stringsAsFactors}.
}
 \value{
   The modified value of \code{_data}.
-

--
Ken Williams, Senior Research Scientist
WindLogics
http://windlogics.com



CONFIDENTIALITY NOTICE: This e-mail message is for the s...{{dropped:10}}

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] install.packages() fails if .libPaths() set

2012-10-29 Thread Hadley Wickham
Reproducible example:

dir.create("test")
.libPaths("test")
install.packages("relations", type = "source")

Fails with:

...
* installing *source* package ‘relations’ ...
...
** testing if installed package can be loaded
*** arch - i386
Error : package ‘sets’ required by ‘relations’ could not be found
Error: loading failed
Execution halted
*** arch - x86_64
Error : package ‘sets’ required by ‘relations’ could not be found
Error: loading failed
Execution halted
ERROR: loading failed for ‘i386’, ‘x86_64’

If I don't set .libPaths() it installs without error.

This is on a fairly recent version of R-devel (Oct 3) and on R 2.15.1

Hadley

-- 
RStudio / Rice University
http://had.co.nz/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel