Learn R Programming

dm (version 0.1.2)

head.zoomed_dm: utils table manipulation methods for zoomed_dm objects

Description

Extract the first or last rows from a table. Use these methods without the '.zoomed_dm' suffix (see examples). The methods for regular dm objects extract the first or last tables.

Usage

# S3 method for zoomed_dm
head(x, n = 6L, ...)

# S3 method for zoomed_dm tail(x, n = 6L, ...)

Arguments

x

object of class zoomed_dm

n

a single integer. If positive or zero, size for the resulting object: number of elements for a vector (including lists), rows for a matrix or data frame or lines for a function. If negative, all but the n last/first number of elements of x.

...

arguments to be passed to or from other methods.

Value

A zoomed_dm object.

Details

see manual for the corresponding functions in utils.

Examples

Run this code
# NOT RUN {
zoomed <- dm_nycflights13() %>%
  dm_zoom_to(flights) %>%
  head(4)
zoomed
dm_insert_zoomed(zoomed, new_tbl_name = "head_flights")
# }

Run the code above in your browser using DataLab