@guillaume.thirel and @david.dorchies do you agree to submit airGR v1.6.9.21 to the CRAN?
Activity
The CI didn't success because you have remove some variables in the example (
TimeFormat
,YearFirstMonth
,ConvertFun
). They exists in the stable version and not anymore so the regression test say that there is a difference.To skip the test on these variables, add them to the
.regressionignore
file located at the root of the repository.Edited by Dorchies David
@david.dorchies don't you find it is confusing for the user if
getAggregConvertFun()
is private? It means that he can't see what is the default values of theConvertFun
argument does:getAggregConvertFun(names(x)[-1])
Edited by Delaigue OlivierYou are right. Since it is a default argument of
ConvertFun
argument ofSeriesAggreg
it should be documented. But I don't think that this function is useful for the user.The only information really useful for the user is the data.frame
.AggregConvertFunTable
which is already public.So I suggest to use an argument
ConvertFunTable = .AggregConvertFunTable
instead ofConvertFun = .AggregConvertFun(names(TabSeries)[-1])
inSeriesAggreg
and to call the private functiongetAggregConvertFun(ConvertFunTable)
inSeriesAggreg
.In this case, why not just keep only the argument
ConvertFun = NULL
by default and explain in the help page that in this case it uses the table.AggregConvertFunTable
. AConvertFunTable
argument will not be very easy to check. Don't you think so?Edited by Delaigue OlivierA
ConvertFunTable
argument will not be very easy to check. Don't you think so?I don't think so. It involves only 4 conditions:
if(!is.data.frame(ConvertFunTable) stop... if(names(ConvertFunTable) != c("ConvertFun", "Outputs")) stop... if(!all(ConvertFunTable$ConvertFun %in% c("mean", "sum"))) stop... if(!is.character(ConvertFunTable$Outputs)) stop
I still think that exposing
ConvertFunTable
instead ofConvertFun
is a better idea because:- it's more complicated for the user to write a ConvertFun function than modifying
.AggregConvertFunTable
or create is own two column-data.frame - now that you've added messages in
getAggregConvertFun
for unknown object, it should not be overwritten by the user inSeriesAggreg
- it's more complicated for the user to write a ConvertFun function than modifying
@david.dorchies, to be consistent with v1.6.9.1 (see commit 1a95e4af).
@francois.bourgin, do you approve?
changed milestone to %v1.6.10
mentioned in commit 3f30fdb5