-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict with lubridate::here() #37
Comments
It looks like library(here)
#> here() starts at /tmp/RtmpcFhpW6/reprex44ae186a5ab3
library(lubridate)
#>
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:here':
#>
#> here
#> The following object is masked from 'package:base':
#>
#> date
here("02_data", "mydfname.rda")
#> Error in here("02_data", "mydfname.rda"): unused arguments ("02_data", "mydfname.rda") Created on 2020-01-30 by the reprex package (v0.3.0) I can propose two solutions: {conflicted} or conflictedlibrary(here)
#> here() starts at /tmp/RtmpcFhpW6/reprex44ae6dbee44f
library(lubridate)
#>
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:here':
#>
#> here
#> The following object is masked from 'package:base':
#>
#> date
library(conflicted)
here("02_data", "mydfname.rda")
#> Error: [conflicted] `here` found in 2 packages.
#> Either pick the one you want with `::`
#> * lubridate::here
#> * here::here
#> Or declare a preference with `conflict_prefer()`
#> * conflict_prefer("here", "lubridate")
#> * conflict_prefer("here", "here")
conflict_prefer("here", "here")
#> [conflicted] Will prefer here::here over any other package
here("02_data", "mydfname.rda")
#> [1] "/tmp/RtmpcFhpW6/reprex44ae6dbee44f/02_data/mydfname.rda" Created on 2020-01-30 by the reprex package (v0.3.0)
|
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary. |
I have been trying to use here() within a project where I am importing data from an online Research database.
I have then attempt to use here() within the saveRDS() function e.g.
saveRDS(mydfname, file= here("02_data", "mydfname.rda"))
This would ensure I have a local copy of the data for if I need to work on the project but I am offline.
When I execute the code my data import runs as expected, but the saveRDS function returns the following error
Error in here("02_data", "mydfname.rda") : unused arguments ("02_data", "mydfname.rda")
I have searched the issues listed here and online but have not found any other reports of this issue.
My work around is that I am having to input the file directory in full for saveRDS() but here is working for file calls using readRDS() and source()
I may be missing something simple so excuse my ignorance if that is the case.
The text was updated successfully, but these errors were encountered: