Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/herePublic

A simpler way to find your files

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
NotificationsYou must be signed in to change notification settings

r-lib/here

Repository files navigation

Lifecycle: stablerccCRAN statusCodecov test coverage

The goal of the here package is to enable easy file referencing inproject-oriented workflows. Incontrast to usingsetwd(), which is fragile and dependent on the wayyou organize your files, here uses the top-level directory of a projectto easily build paths to files.

Installation

Install the released version of here from CRAN:

install.packages("here")

Usage

The here package creates paths relative to the top-level directory. Thepackage displays the top-level of the current project on load or anytime you callhere():

here::i_am("README.Rmd")#> here() starts at /Users/kirill/git/R/r-lib/herehere()#> [1] "/Users/kirill/git/R/r-lib/here"

You can build a path relative to the top-level directory in order toread or write a file:

here("inst","demo-project","data","penguins.csv")#> [1] "/Users/kirill/git/R/r-lib/here/inst/demo-project/data/penguins.csv"readr::write_csv(palmerpenguins::penguins, here("inst","demo-project","data","penguins.csv"))

These relative paths work regardless of where the associated source filelives inside your project, like analysis projects with data and reportsin different subdirectories. See the includeddemoproject foran example.

Illustration byAllison Horst


Code of Conduct

Please note that the here project is released with aContributor Codeof Conduct. Bycontributing to this project, you agree to abide by its terms.

About

A simpler way to find your files

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors16

Languages


[8]ページ先頭

©2009-2025 Movatter.jp