Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other output_format for get_format #6

Closed
AQLT opened this issue Mar 9, 2024 · 5 comments
Closed

Other output_format for get_format #6

AQLT opened this issue Mar 9, 2024 · 5 comments

Comments

@AQLT
Copy link
Contributor

AQLT commented Mar 9, 2024

Since the template is simple, it could be good to enable other output_format than only html.
Moreover, not at it is not recommended to write by default in users home filespace.

@TanguyBarthelemy
Copy link
Collaborator

TanguyBarthelemy commented Mar 19, 2024

hi Alain,
Yes it would be interesting to be able to export the report in other formats (pdf for example).

Also, the path.out argument currently allows you to choose the destination of the generated file. But what is your opinion when the user does not provide a path.
Is it better to return an error or choose another path?
Here the default destination is not home but the working directory of the user's project, is it a bad practice?
https://github.com/rjdemetra/rjd3revisions/blob/86696a12dcb41afa617c6731f0fac5c47aee2c0d/R/report.R#L47

@AQLT
Copy link
Contributor Author

AQLT commented Mar 19, 2024

Hi Tanguy,
On the path.out option it is not allowed by CRAN policies (also in examples/vignettes). For CRAN we must only write/save files if the user has specified a directory in the function themselves.
That's why the RJDemetra::save_spec() uses by default the tempdir() function, RJDemetra::save_worskpace() example use a tempdir() and rjwsacruncher::create_param_file() doesn't have any default directory

@TanguyBarthelemy
Copy link
Collaborator

Ok so:

  • either generate an error if the path.out argument is missing,
  • or generate it in a tempdir

@TanguyBarthelemy
Copy link
Collaborator

We extended the output to .pdf and .html. Maybe to .docx files but there are some problem with the tables currently.

@TanguyBarthelemy
Copy link
Collaborator

I think this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants