Summarise function in plyr package in R

r

#1

Hi,

I am learning about plyr package in R and tried to use the summarise function with a data set that I had.

library(plyr)
nba=read.csv(“NBA_train.csv”)
summarise(nba)

I am getting the result as->
data frame with 0 columns and 0 rows

I wanted to know whether I have to add something else to the function or what to get the required columns and rows.
Thanks.


#2

do ?? summarise

or see this

http://www.inside-r.org/packages/cran/plyr/docs/summarise

Description
Summarise works in an analagous way to transform, except instead of adding columns to an existing data frame, it creates a new data frame. This is particularly useful in conjunction with ddply as it makes it easy to perform group-wise summaries.

Usage
summarise(.data, …)
Arguments
.data
the data frame to be summarised

further arguments of the form var = value