From je@n-|uc@||p@tz @end|ng |rom |n@ee@|r  Thu Jan  9 13:40:57 2020
From: je@n-|uc@||p@tz @end|ng |rom |n@ee@|r (Lipatz Jean-Luc)
Date: Thu, 9 Jan 2020 12:40:57 +0000
Subject: [Rd] mean
Message-ID: <FEF25E56AFC7064784FA97C576467E0A020580ACD1@pdexchbalwst01.ad.insee.intra>

Hello,

Is there a reason for the following behaviour?
> mean(c("1","2","3"))
[1] NA
Warning message:
In mean.default(c("1", "2", "3")) :
  l'argument n'est ni num?rique, ni logique : renvoi de NA

But:
> var(c("1","2","3"))
[1] 1

And also:
> median(c("1","2","3"))
[1] "2"

But:
> quantile(c("1","2","3"),p=.5)
Error in (1 - h) * qs[i] : 
  argument non num?rique pour un op?rateur binaire

It sounds like a lack of symetry. 
Best regards.


Jean-Luc LIPATZ
Insee - Direction g?n?rale
Responsable de la coordination sur le d?veloppement de R et la mise en oeuvre d'alternatives ? SAS



[Rd] mean
Lipatz Jean-Luc