Skip to content

Commit

Permalink
s/=/<-/g
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Keane <[email protected]>
  • Loading branch information
nealrichardson and jonkeane committed May 13, 2021
1 parent cc55d47 commit 52643dd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions r/R/dplyr-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ nse_funcs$between <- function(x, left, right) {

# as.* type casting functions
# as.factor() is mapped in expression.R
nse_funcs$as.character = function(x) {
nse_funcs$as.character <- function(x) {
Expression$create("cast", x, options = cast_options(to_type = string()))
}
nse_funcs$as.double = function(x) {
nse_funcs$as.double <- function(x) {
Expression$create("cast", x, options = cast_options(to_type = float64()))
}
nse_funcs$as.integer = function(x) {
nse_funcs$as.integer <- function(x) {
Expression$create(
"cast",
x,
Expand All @@ -91,7 +91,7 @@ nse_funcs$as.integer = function(x) {
)
)
}
nse_funcs$as.integer64 = function(x) {
nse_funcs$as.integer64 <- function(x) {
Expression$create(
"cast",
x,
Expand All @@ -102,15 +102,15 @@ nse_funcs$as.integer64 = function(x) {
)
)
}
nse_funcs$as.logical = function(x) {
nse_funcs$as.logical <- function(x) {
Expression$create("cast", x, options = cast_options(to_type = boolean()))
}
nse_funcs$as.numeric = function(x) {
nse_funcs$as.numeric <- function(x) {
Expression$create("cast", x, options = cast_options(to_type = float64()))
}

# String functions
nse_funcs$nchar = function(x, type = "chars", allowNA = FALSE, keepNA = NA) {
nse_funcs$nchar <- function(x, type = "chars", allowNA = FALSE, keepNA = NA) {
if (allowNA) {
arrow_not_supported("allowNA = TRUE")
}
Expand All @@ -128,7 +128,7 @@ nse_funcs$nchar = function(x, type = "chars", allowNA = FALSE, keepNA = NA) {
}
}

nse_funcs$str_trim = function(string, side = c("both", "left", "right")) {
nse_funcs$str_trim <- function(string, side = c("both", "left", "right")) {
side <- match.arg(side)
trim_fun <- switch(side,
left = "utf8_ltrim_whitespace",
Expand Down

0 comments on commit 52643dd

Please sign in to comment.