Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
datautils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioinfo
datautils
Commits
6118b980
Commit
6118b980
authored
9 years ago
by
Holger Brandl
Browse files
Options
Downloads
Patches
Plain Diff
changed to use wd for temporary files
parent
81a29965
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
R/rendr/rend.R
+9
-3
9 additions, 3 deletions
R/rendr/rend.R
R/rendr/test/inline_test.png
+0
-0
0 additions, 0 deletions
R/rendr/test/inline_test.png
R/rendr/test/simple_report.R
+4
-0
4 additions, 0 deletions
R/rendr/test/simple_report.R
with
13 additions
and
3 deletions
R/rendr/rend.R
+
9
−
3
View file @
6118b980
...
...
@@ -56,9 +56,15 @@ if(!file.exists(r_script)){
}
## postfix a default empty yaml header
## todo maybe we should rather run it in the script-home-dir to ensure that additional resources (e.g. pngs are picked up correctly)
tmpScript
<-
tempfile
(
fileext
=
".R"
,
tmpdir
=
dirname
(
normalizePath
(
r_script
)))
## Create a temporary script in the current working directory to ensure that created resources plots etc can be inlined
## To allow for additional resoucrces from the scripts directory to be inlined into the final documents, the directory
## of the script is exposed as a variable called RENDR_SCRIPT_DIR
## Note:## Using the script-home-dir as wd does not work because plot pngs would not make it into the final document. Also
## It's better to not clutter the directory containing the script since it might be under version control.
RENDR_SCRIPT_DIR
=
dirname
(
normalizePath
(
r_script
))
tmpScript
<-
tempfile
(
fileext
=
".R"
,
tmpdir
=
getwd
())
print
(
paste
(
"compiling tmp-script in "
,
tmpScript
,
"'"
))
#tmpScript <- "tt.R"
...
...
This diff is collapsed.
Click to expand it.
R/rendr/test/inline_test.png
0 → 100644
+
0
−
0
View file @
6118b980
25.1 KiB
This diff is collapsed.
Click to expand it.
R/rendr/test/simple_report.R
+
4
−
0
View file @
6118b980
...
...
@@ -17,3 +17,7 @@ datatable(iris)
## cd Desktop; export PATH=/Users/brandl/Dropbox/Public/datautils/R/rendr:$PATH
## rend.R -e /Users/brandl/Dropbox/Public/datautils/R/rendr/test/simple_report.R --fancy_arg 3 -E "foo bar"
## rend.R -E /Users/brandl/Dropbox/Public/datautils/R/rendr/test/simple_report.R
#' `)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment