rjournal / rjtools

Tools for AUTHORS to use for checking and submitting articles to the R Journal
https://rjournal.github.io/rjtools/
Other
31 stars 14 forks source link

`create_article(create_dir=TRUE)` fails to create directory tree #116

Open bastistician opened 10 months ago

bastistician commented 10 months ago
rjtools::create_article("test", create_dir = TRUE)

should create a directory "test" with the article template, but instead gives

Error: [ENOENT] Failed to move 'penguins.png' to 'figures/penguins.png': no such file or directory

with the following tree:

.
├── data
├── figures
└── test
    ├── motivation-letter.md
    ├── penguins.png
    ├── RJournal.sty
    ├── RJreferences.bib
    └── test.Rmd

I have used the current development version of rjtools (as at Commit 7817168) in current R 4.3.2.

dicook commented 10 months ago

Hi @bastistician Thanks for the report. The "test" directory is complete, though, so as long as you then use that as your paper working directory, test.proj, then all is good.

The error is due to not setting up correctly when a folder is specified. We made the default rjtools::create_article() set up the nice folder structure, in the current directory, to help new authors get their work organised. It was not finished properly, to work correctly when a folder is specified. We'll fix that.