top: Select top n rows returns a lazy evaluation object, Teradata...

Description Usage Arguments Value Examples

Description

top gets the top n of rows from lazy evaluation object and returns a lazy evaluation object.

Usage

1
top(x = NULL, n = NULL)

Arguments

x:

Lazy evaluation object. Object created from the function 'tbl'.

n:

Number of rows, n defaults to 10.

Value

Returns a lazy evaluation object with n rows from a lazy evaluation object.

Examples

1
2
3
4
5
6
7
#Top 20 rows from lazy evaluation object
   tbl(post,sql("SELECT * FROM
                 CALENDAR")) %>%
   group_by(ACCOUNT_YEAR_WEEK,
            SEASON) %>%
   summarise(WEEK_ENDING=max(CAL_DATE)) %>%
   top(n=20)

DyfanJones/connectR documentation built on May 23, 2019, 10:32 p.m.