Skip to content

Commit 7c092ed

Browse files
Fix for older versions of data.table package.
1 parent 07c216c commit 7c092ed

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

covidm/R/covidm_interventions.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
# set up interventions
55
# TODO remove reliance on cm_translate_parameters, for efficiency?
6-
# TODO I don't like that this has to set contact and fIs.
76
cm_iv_build = function(parameters)
87
{
98
p = cm_translate_parameters(parameters)
@@ -13,7 +12,7 @@ cm_iv_build = function(parameters)
1312
cm_iv_checkset = function(iv, what, change)
1413
{
1514
if (!(what %in% names(iv))) {
16-
iv[, (what) := list(rep(1, length(change)))];
15+
iv[, (what) := rep(list(rep(1, length(change))), .N)];
1716
}
1817
}
1918

0 commit comments

Comments
 (0)