Learn R Programming

pammtools (version 0.2.3)

dplyr_verbs: dplyr Verbs for ped-Objects

Description

See dplyr documentation of the respective functions for description and examples.

Usage

# S3 method for ped
arrange(.data, ...)

# S3 method for ped group_by(.data, ..., add = FALSE)

# S3 method for ped ungroup(x, ...)

# S3 method for ped filter(.data, ...)

# S3 method for ped sample_n(tbl, size, replace = FALSE, weight = NULL, .env = NULL, ...)

# S3 method for ped sample_frac(tbl, size = 1, replace = FALSE, weight = NULL, .env = NULL, ...)

# S3 method for ped slice(.data, ...)

# S3 method for ped select(.data, ...)

# S3 method for ped mutate(.data, ..., keep_attributes = TRUE)

# S3 method for ped rename(.data, ...)

# S3 method for ped summarise(.data, ...)

# S3 method for ped summarize(.data, ...)

# S3 method for ped transmute(.data, ...)

# S3 method for ped inner_join(x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ...)

# S3 method for ped full_join(x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ...)

# S3 method for ped left_join( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep_attributes = TRUE )

# S3 method for ped right_join( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep_attributes = TRUE )

# S3 method for nested_fdf arrange(.data, ...)

# S3 method for nested_fdf group_by(.data, ..., add = FALSE)

# S3 method for nested_fdf ungroup(x, ...)

# S3 method for nested_fdf filter(.data, ...)

# S3 method for nested_fdf sample_n(tbl, size, replace = FALSE, weight = NULL, .env = NULL, ...)

# S3 method for nested_fdf sample_frac(tbl, size = 1, replace = FALSE, weight = NULL, .env = NULL, ...)

# S3 method for nested_fdf slice(.data, ...)

# S3 method for nested_fdf select(.data, ...)

# S3 method for nested_fdf mutate(.data, ..., keep_attributes = TRUE)

# S3 method for nested_fdf rename(.data, ...)

# S3 method for nested_fdf summarise(.data, ...)

# S3 method for nested_fdf summarize(.data, ...)

# S3 method for nested_fdf transmute(.data, ...)

# S3 method for nested_fdf inner_join(x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ...)

# S3 method for nested_fdf full_join(x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ...)

# S3 method for nested_fdf left_join( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep_attributes = TRUE )

# S3 method for nested_fdf right_join( x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ..., keep_attributes = TRUE )

Arguments

.data

an object of class ped, see as_ped.

...

see dplyr documentation

x

an object of class ped, see as_ped.

tbl

an object of class ped, see as_ped.

size

For sample_n(), the number of rows to select. For sample_frac(), the fraction of rows to select. If tbl is grouped, size applies to each group.

replace

Sample with or without replacement?

weight

Sampling weights. This must evaluate to a vector of non-negative numbers the same length as the input. Weights are automatically standardised to sum to 1.

This argument is automatically quoted and later evaluated in the context of the data frame. It supports unquoting. See vignette("programming") for an introduction to these concepts.

.env

This variable is deprecated and no longer has any effect. To evaluate weight in a particular context, you can now unquote a quosure.

keep_attributes

conserve attributes? defaults to TRUE

y

tbls to join

by

a character vector of variables to join by. If NULL, the default, *_join() will do a natural join, using all variables with common names across the two tables. A message lists the variables so that you can check they're right (to suppress the message, simply explicitly list the variables that you want to join).

To join by different variables on x and y use a named vector. For example, by = c("a" = "b") will match x.a to y.b.

copy

If x and y are not from the same data source, and copy is TRUE, then y will be copied into the same src as x. This allows you to join tables across srcs, but it is a potentially expensive operation so you must opt into it.

suffix

If there are non-joined duplicate variables in x and y, these suffixes will be added to the output to disambiguate them. Should be a character vector of length 2.

.dots

see dplyr documentation

Value

a modified ped object (except for do)