-
Notifications
You must be signed in to change notification settings - Fork 7
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
Def data enhancements #134
Conversation
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 608c3d7 is merged into main:
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 87b6811 is merged into main:
|
@assignUser This was a tad premature - I haven't added anything to the vignettes - I need to do that. |
@assignUser Vignette is updated, so I think it is ready to go. |
This is how benchmark results would change (along with a 95% confidence interval in relative change) if a38e474 is merged into main:
|
I'll check it out this weekend :) |
R/define_data.R
Outdated
#' def <- defDataAdd(def, varname = "a", formula = "1;1", dist = "trtAssign") | ||
#' def <- defRepeatAdd(def, 8, "b", formula = "5 + a", variance = 3, dist = "normal") | ||
#' def <- defDataAdd(def, "y", formula = "0.10", dist = "binary") | ||
#' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need defRepeatAdd
in addition to defRepeat
as they do the same thing? Code duplication like this is usally a big no-no :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well - they do the same thing, except for the variable checking, just like defData
and defDataAdd
. defRepeatAdd
calls defDataAdd
, whereas defRepeat
calls defData
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I see. Ah that remindes me of #18
But that can still be done without complete duplication of code... I`ll try it later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, defRepeat
wouldn't be needed at all if defData
had another argument nVars
that would just indicate how many instances of the current variable. But, I don't mind the extra function, since it makes it explicit what the user is trying to do. Again, complete transparency at the expense of efficiency.
This is how benchmark results would change (along with a 95% confidence interval in relative change) if a53e7da is merged into main:
|
@assignUser Just wanted to confirm that we are on board with this, and I can go ahead and merge ... |
Sure, go ahead we will deal with the code duplication when handeling #18 as it is basically the same thing :D |
@assignUser This Includes two new functions
defRepeat
anddefRepeatAdd
. Tests have been included.