Skip to content

write_csv() returns modified tibble instead of input #975

@adamroyjones

Description

@adamroyjones

The subject describes the issue fully. Below is a working example. Versions are:

  • R 3.5.2 (on Ubuntu 16.04.5 LTS on x86_64),
  • readr 1.3.1,
  • magrittr 1.5,
  • lubridate 1.7.4, and
  • tibble 2.0.1.
library(tibble)
library(lubridate)
library(magrittr)
library(readr)

tbl = tribble(
  ~date, ~value,
  ymd("2019-05-05"), 1
)

tbl # class(tbl$date[1]) = "Date"

tbl = tbl %>% write_csv("tmp.csv")

tbl # class(tbl$date[1]) = "character"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions