Comments (4)
Can we please have this implemented? I'd like to use {here}
, but currently the here()
function is nearly useless to me because I have a lot of nested folders and I don't memorize the long paths in order to specify where a file or folder is by manually typing in each item in the path from the here()
root.
from here.
I was about to make this request myself. I huge downside of file.path
and here
is the lack of tab completion.
from here.
Thanks for the nudge.
In RStudio, you could type
here("file<tab>
and it would autocomplete the file with its full path relative to the RStudio project (which is frequently also the project root):
here("my/local/file.txt"
This is a perfectly valid input for here()
. Would that help? Do we need to document this better?
from here.
I am considering a use case that goes beyond that, and may not be something that is a goal for {here}
. Highly structured projects can lead to tall directory trees:
(base) balter@expiyes:~$ tree rnaseq_proj/
rnaseq_proj/
├── align
│ ├── logs
│ ├── reports
│ ├── results
│ └── src
│ ├── alignment_diagnostics.Rmd
│ └── run_bwa.Rmd
├── config.R
├── data
│ └── raw
│ └── test.fastq
├── setup
│ ├── logs
│ ├── reports
│ ├── results
│ └── src
│ └── run_fastqc.Rmd
└── trim
├── logs
├── reports
├── results
└── src
├── trim_diagnostics.Rmd
└── trim_sequences.Rmd
So, I frequently like to create variables for file paths, e.g.:
raw_data_dir = here("data/raw")
Or, maybe I have another reason to have a folder name in a variable.
test_type = "raw"
test_fastq_file = here("data", test_type, "test.fastq")
I think it would be awesome if here
and (file.path
) would use intellisense so that I could do
data_dir = here("data")
test_fastq_file = here(data_dir, test_type, <tab>......
from here.
Related Issues (20)
- here often fails to identify directory on google drive on windows HOT 3
- Move `master` branch to `main` HOT 3
- `here::u_r()`
- Failing to install here library with R 4.1.2
- Quarto.qmd does not render with library(here) HOT 5
- Can here() give the short path in windows, to make compatible with use cases where a path with spaces will fail? HOT 3
- Here not set correctly on Mac HOT 2
- Help: use Here with write.csv HOT 3
- Non-R-dominant folder setup HOT 9
- [feature request] detect and respect names HOT 1
- [help] how can I use here() in different R sessions HOT 1
- Not recognizing the .here file in root directory HOT 4
- Suggestion: `list.files()` with and for here HOT 1
- here() package conflicts in recent R/RStudio HOT 1
- There is no reponse when library (here) in vsocde radian console HOT 1
- here incorrect working directory using cronr package HOT 1
- Broken link in README.md
- Empty string breaks paths
- Feature idea - here::right_here()
- does not seem to be case sensative HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from here.