Hi,

In follow up to the thread on R-Help yesterday:

  https://stat.ethz.ch/pipermail/r-help/2019-February/461725.html

I am attaching a proposed patch against the trunk version of Extract.Rd, with 
wording added to the "Matrices and arrays" section, to note that indexing these 
object by factors behaves in a manner consistent with vectors.

Regards,

Marc Schwartz

--- ExtractORIG.Rd      2019-02-21 08:17:47.000000000 -0500
+++ ExtractMOD.Rd       2019-02-21 08:23:35.000000000 -0500
@@ -151,6 +151,9 @@
   indices can be numeric, logical, character, empty or even factor.
   An empty index (a comma separated blank) indicates that all entries in
   that dimension are selected.
+  As with vectors, indexing by factors is equivalent to indexing by the
+  numeric codes (see \code{\link{factor}}) and not by the character
+  values which are printed (for which use \code{[as.character(i)]}).
   The argument \code{drop} applies to this form of indexing.
 
   A third form of indexing is via a numeric matrix with the one column

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

Reply via email to