set_dbl {framecleaner}R Documentation

set double

Description

set double

Usage

set_dbl(.data, ...)

## S3 method for class 'character'
set_dbl(.data, ...)

## S3 method for class 'factor'
set_dbl(.data, ...)

## S3 method for class 'Date'
set_dbl(.data, ...)

## S3 method for class 'numeric'
set_dbl(.data, ...)

## S3 method for class 'integer64'
set_dbl(.data, ...)

## S3 method for class 'data.frame'
set_dbl(.data, ...)

Arguments

.data

dataframe

...

tidyselect. Default selection: none

Value

tibble

Examples




date_col <- c(lubridate::ymd(20180101), lubridate::ymd(20210420))


tibble::tibble(int = c(1L, 2L),
fct = factor(c(10, 11)),
date = date_col,
chr = c("a2.1", "rtg50.5")) -> t1

t1

t1 %>%
set_dbl(tidyselect::everything())

# s3 method works for vectors individually
# custom date coercion to represent date as a number. For lubridate's coercion method, use set_int
date_col %>%
set_dbl


[Package framecleaner version 0.2.1 Index]