Description Usage Arguments Value Examples
sample_sql gets a sample of n rows from lazy evaluation object and returns a lazy evaluation object.
1 | sample_sql(x = NULL, n = NULL)
|
x: |
Lazy evaluation object. Object created from the function 'tbl'. |
n: |
Number of rows, n defaults to 10. |
Returns a lazy evaluation object with n rows from a lazy evaluation object.
1 2 3 4 5 6 7 | #Sample 20 rows from lazy evaluation object
tbl(post,sql("SELECT * FROM
CALENDAR")) %>%
group_by(ACCOUNT_YEAR_WEEK,
SEASON) %>%
summarise(WEEK_ENDING=max(CAL_DATE)) %>%
sample_sql(n=20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.