nrow

nrow returns the number of rows in a DataFrame

Syntax:

  • nrow(df)

Parameters:

  • df: Any SparkR DataFrame

Output:

  • List
# Create SparkR DataFrame
df <- createDataFrame(sqlContext, mtcars)
head(df)
# View number of rows in df
nrow(df)