Skip to content
Prev 140547 / 398506 Next

colMeans in a data.frame with numeric and character data

On Thu, Mar 27, 2008 at 3:05 PM, Dimitris Rizopoulos
<Dimitris.Rizopoulos at med.kuleuven.be> wrote:
Alternatively
x          y          z
-0.5260131  1.0523121         NA
Warning message:
In mean.default(X[[3L]], ...) :
  argument is not numeric or logical: returning NA

If you don't like the warning message showing up you can wrap the
expression in suppressWarnings().