Dear R-core, The language definition is very clear:
"As from R 1.4.0, any arithmetic operation involving a zero-length vector has a zero-length result."
Thus, `1 + numeric()` returns `numeric(0)`. However, I don't find this very intuitive because usually the shorter vector is recycled to the length of the longer vector. Would it be possible to throw at least a warning for such cases? I don't expect them to be intended by most users.
Best regards, -- Dr. Roland Fuß Thünen-Institut für Agrarklimaschutz/ Thünen Institute of Climate-Smart Agriculture Bundesallee 65 D-38116 Braunschweig, Germany Tel.: ++49 531 596 2627 Fax: ++49 531 596 2699 Email: roland.f...@thuenen.de Arbeitsgruppe "Emissionsberichterstattung"/ Working group "Emission Inventories" Email: emissionsinvent...@thuenen.de Das Johann Heinrich von Thünen-Institut, Bundesforschungsinstitut für Ländliche Räume, Wald und Fischerei – kurz: Thünen-Institut – besteht aus 15 Fachinstituten, die in den Bereichen Ökonomie, Ökologie und Technologie forschen und die Politik beraten. The Johann Heinrich von Thünen Institute, Federal Research Institute for Rural Areas, Forestry and Fisheries – Thünen Institute in brief – consists of 15 specialized institutes that carry out research and provide policy advice in the fields of economy, ecology and technology. ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel