Skip to content

Commit 9bea4d5

Browse files
lwjohnst86signekb
andauthored
docs: ✏️ edits from review
Co-authored-by: Signe Kirk Brødbæk <40836345+signekb@users.noreply.github.com>
1 parent cf0c87c commit 9bea4d5

4 files changed

Lines changed: 20 additions & 18 deletions

File tree

R/get.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ get_project_workdata_dir <- function() {
7575
cli::cli_abort(
7676
c(
7777
"Can't set the {.path workdata/} path without a project ID.",
78-
"i" = "Use {.code options(fastreg.project_workdata_dir = '<path>')} or change into a directory within a project."
78+
"i" = "Use {.code options(fastreg.project_workdata_dir = '<path>')} or change into a working directory within a project."
7979
)
8080
)
8181
}

tests/testthat/test-get.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ test_that("`get_project_id()` errors for IDs not of length 6", {
3333
test_that("`get_project_id()` warns for not finding a project ID", {
3434
temp_dir <- fs::path_temp("non-number/test/project/")
3535
fs::dir_create(temp_dir, recurse = TRUE)
36-
project_id <- withr::with_dir(
36+
withr::with_dir(
3737
temp_dir,
3838
{
3939
expect_warning(get_project_id(), regexp = "`NA`")
@@ -45,7 +45,7 @@ test_that("`get_project_id()` warns for not finding a project ID", {
4545
)
4646
})
4747

48-
test_that("should fail as no `E:` drive exists", {
48+
test_that("should fail if no `E:` drive exists", {
4949
temp_path <- fs::path_temp("701010/")
5050
fs::dir_create(temp_path)
5151
withr::with_dir(

vignettes/design.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ The actions are:
3838
- `list`: List files in a directory, e.g., SAS or Parquet files.
3939
- `read`: Read a Parquet register into R as a DuckDB table.
4040
- `use`: Use a template in the current project.
41-
- `get`: Get or guess some information, e.g., the project ID from the
42-
current working directory.
41+
- `get`: Get or guess some information, e.g., the project ID, workdata directory, or rawdata directory from the
42+
current working directory.
4343

4444
While the objects are:
4545

vignettes/fastreg.qmd

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ show_tree(sas_dir)
7676

7777
## Settings to correct paths
7878

79-
Many of fastreg's functions depend on the correct locations to the
80-
original SAS files and the eventual Parquet files. This applies to both
81-
the conversion and writing functions, as well as to the reading
82-
functions. Through `options()` you can set these paths in our two
79+
Many of fastreg's functions depend on the locations of the
80+
original SAS files and the eventual Parquet files including
81+
the conversion, writing, and reading
82+
functions. Through `options()` you can set these paths in two
8383
settings: `fastreg.project_rawdata_dir` and
8484
`fastreg.project_workdata_dir`. You can set these `options()` at the top
8585
of your R script or Quarto document, in your R Project's `.Rprofile`, or
86-
in your user-level `.Rprofile`. To add to the file, at the top, write
87-
out (using a temporary directory here for these examples):
86+
in your user-level `.Rprofile`. To add to the file, at the top of an R script, write
87+
(using a temporary directory here for these examples):
8888

8989
```{r options}
9090
options(
@@ -94,20 +94,22 @@ options(
9494
)
9595
```
9696

97-
Or, if you want to set those exact same options for the R Project's
98-
`.Rprofile`, you can run:
97+
If you want to set those exact same options in the R Project's
98+
`.Rprofile`, run the following line in your Console to open up the `.Rprofile` file for the project:
9999

100100
```{r options-project-profile}
101101
#| filename: "Console"
102102
#| eval: false
103103
usethis::edit_r_profile("project")
104104
```
105105

106-
Which opens up the `.Rprofile` file for the project. You can then add
107-
the same `options()` to that file and save it. The next time you open
108-
the project, those options will be set. Or, to set it for all of your R
109-
projects and sessions, you can set it globally in your user-level
110-
`.Rprofile`:
106+
You can then add
107+
the same `options()` as shown in the R script example above to that file and save it. The next time you open
108+
the project, those options will be set.
109+
110+
If you want to set these options for all of your R
111+
projects and sessions, you can add them globally in your user-level
112+
`.Rprofile`. To open the `.Rprofile`, run:
111113

112114
```{r options-user-profile}
113115
#| filename: "Console"

0 commit comments

Comments
 (0)