Hello,

In ?Extract, one can read "An empty index selects all values: this is most often used to replace all the entries but keep the attributes" No example is given but if x a vector I interpret this sentence as "x[]". And in fact, all attributes seem to be preserved by this indexing. But in the R language manual (https://cran.r-project.org/doc/manuals/r-devel/R-lang.html#Indexing-by-vectors), the following passage puzzles me : "Empty. The expression x[] returns x, but drops “irrelevant” attributes from the result." I must misunderstand something because it sounds contradictory with the help page.

Thank you

SD

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to