[R] colMeans function

Engin Yılmaz |@p@nyo|com @end|ng |rom gm@||@com
Wed Nov 4 14:26:58 CET 2020


Dear
I use *flights* database library(nycflights13)

The following code is working as

colMeans(flights[2])

* 6.54851*

but other code is  not working as

colMeans(flights$month)

*Error in colMeans(flights$month) : *
*  'x' must be an array of at least two dimensions*

*flights[2]* is equal to the *month *column in database

*Sincerely*
Engin YILMAZ

	[[alternative HTML version deleted]]



More information about the R-help mailing list