readr::write_csv(datasets::BOD, "your-file.csv")

2019-12-10 reprex

The working directory

By default, reprex works on a temporary directory.

reprex::reprex(getwd())

yields

getwd()
#> [1] "C:/Users/Mauro/AppData/Local/Temp/RtmpcDRddU/reprex108c190d657"

Use outfile = NA to work on your project's working directory.

reprex::reprex(getwd(), outfile = NA)

yields

getwd()
#> [1] "C:/Users/Mauro/git/ds-incubator"

(See the full description of outfile at ?reprex::reprex().)

And

reprex::reprex(readr::read_csv("your-file.csv"), outfile = NA)

yields

readr::read_csv("your-file.csv")
#> Parsed with column specification:
#> cols(
#>   Time = col_double(),
#>   demand = col_double()
#> )
#> # A tibble: 6 x 2
#>    Time demand
#>   <dbl>  <dbl>
#> 1     1    8.3
#> 2     2   10.3
#> 3     3   19  
#> 4     4   16  
#> 5     5   15.6
#> 6     7   19.8


2DegreesInvesting/ds-incubator documentation built on Oct. 13, 2021, 10:09 a.m.