Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
MOTUSR
corona study
Commits
31339631
Commit
31339631
authored
May 02, 2020
by
Kurt Van Dijck
Browse files
Makefile: run cleaning from TMP dir
parent
915b1c8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
31339631
...
...
@@ -88,13 +88,16 @@ cleaning-%.R: cleaning-%.json ../libmotus/libmotusr/cleaning-prototype.R
../libmotus/libmotusr/cleaning-prototype.R
:
@
echo
research_%.RData
:
TMPDIR := $(shell mktemp -d /tmp/motus-clean-XXXXXX)
research_%.RData
:
cleaning-%.R .force-% research_%-raw.RData
@
echo
"---
$@
---"
@
echo
"---
$@
---
in
$(TMPDIR)
"
@
rm
-f
$(
wildcard
*
_
$*
.sav
)
@
echo
$(
filter
%.R,
$^
)
>
.files_
$*
@
cp
$(
filter
%.R,
$^
)
$(
filter
%.RData,
$^
)
$(TMPDIR)
@
cd
$(TMPDIR)
@
R
-q
--vanilla
$(ROPTS)
>
output_
$*
-clean
.log 2>&1
<<
EOF
options(verbose=
$(V)
)
for (file in Sys.glob('
$
{
LIBMOTUS
}
/libmotusr/R/*.R'))
for (file in Sys.glob('
$
(
abspath
$(
LIBMOTUS
)
)
/libmotusr/R/*.R'))
source(file, chdir=TRUE)
load("research_
$*
-raw.RData")
if (exists("diary_raw")) diary = diary_raw;
...
...
@@ -115,6 +118,9 @@ research_%.RData: cleaning-%.R .force-% research_%-raw.RData
save_spss(get(objecttosave), paste(objecttosave,"_
$*
.sav",sep=""))
}
EOF
@
cd -
@
cp
$(TMPDIR)
/*_
$*
*.log
$(TMPDIR)
/*_
$*
.sav
$(TMPDIR)
/
$@
.
@
rm -rf
$(TMPDIR)
@
$(DO_BEST_EFFORT)
research_%.zip
:
research_%.RData
...
...
Kurt Van Dijck
@kvandijck
mentioned in commit
7a806de1
·
May 02, 2020
mentioned in commit
7a806de1
mentioned in commit 7a806de1b2baf4a625b46a0cb5862b9d5630fbf3
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment