Skip to content

Commit

Permalink
Lint assignation <- instead of =
Browse files Browse the repository at this point in the history
  • Loading branch information
TanguyBarthelemy committed Jul 5, 2024
1 parent 1b8c5cf commit b0639cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions R/jd3_extendedairline.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ NULL
.extendedairline_spec<-function(periodicities, differencing=-1, ar=FALSE, toint=FALSE){

if (differencing == -1){
differencing = length(periodicities)
if (! ar) differencing=differencing + 1
differencing <- length(periodicities)
if (! ar) differencing<-differencing + 1

}

Expand Down Expand Up @@ -96,8 +96,8 @@ NULL
#'
#' @examples
.extended_airline_outliers<-function(jregarima, jspec, types=c("ao"), start=0, end=0, critical_value=0, max_outliers=30, max_round=30){
if (start != 0) start=start-1
if (end != 0) end=end-1
if (start != 0) start<-start-1
if (end != 0) end<-end-1
rslt <- .jcall("jdplus/highfreq/base/r/ExtendedAirlineProcessor", "Ljdplus/toolkit/base/api/math/matrices/Matrix;", "outliers",
jregarima, jspec, .jarray(types), as.integer(start), as.integer(end),
as.numeric(critical_value), as.integer(max_outliers), as.integer(max_round) )
Expand Down
6 changes: 3 additions & 3 deletions R/jd3_fractionalairline.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fractionalAirlineEstimation <- function(y,
y_time = NULL) {

# Input checks
mean = FALSE
mean <- FALSE
checkmate::assertNumeric(y, null.ok = FALSE)
checkmate::assertNumeric(criticalValue, len = 1, null.ok = FALSE)
checkmate::assertNumeric(precision, len = 1, null.ok = FALSE)
Expand Down Expand Up @@ -246,9 +246,9 @@ fractionalAirlineEstimation <- function(y,
if (nO > 0) {
regvar_outliers<-rep(NA,nX-nO)
for(j in 1:nX-nO) {
regvar_outliers[j]=paste("x-", j)}
regvar_outliers[j] <- paste("x-", j)}
for (j in 1:nO) {
regvar_outliers[nX-nO+j]<-o[[j]]$toString()}
regvar_outliers[nX-nO+j] <- o[[j]]$toString()}
return(regvar_outliers)
} else {
return(list())
Expand Down

0 comments on commit b0639cc

Please sign in to comment.