tibble icon indicating copy to clipboard operation
tibble copied to clipboard

difference result between data.frame() with tibble()

Open perlatex opened this issue 2 years ago • 1 comments

I asked on the forum, but no one replied. So I'm here for help

library(tidyverse)

myfun1 <- function(v1) {
  data.frame(
    ID = deparse(substitute(v1))
  )
}
myfun1(v1 = model)
#>      ID
#> 1 model




myfun2 <- function(v1) {
  tibble(
    ID = deparse(substitute(v1))
  )
}
myfun2(v1 = model)
#> # A tibble: 1 × 1
#>   ID   
#>   <chr>
#> 1 v1

perlatex avatar Aug 31 '23 06:08 perlatex