rjournal/rjtools

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

Opened this issue · 1 comments

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.

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.