Skip to content

Commit

Permalink
Add reclass() to ZLEMA()
Browse files Browse the repository at this point in the history
Same issue as #131.
  • Loading branch information
joshuaulrich committed Feb 13, 2024
1 parent 6add5d9 commit c2025ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/MovingAverages.R
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,14 @@ function (x, n=10, ratio=NULL, ...) {
# Call C routine
ma <- .Call(C_zlema, x, n, ratio)

# Convert back to original class
ma <- reclass(ma,x)

if(!is.null(dim(ma))) {
colnames(ma) <- "ZLEMA"
}

reclass(ma,x)
return(ma)
}

#-------------------------------------------------------------------------#
Expand Down

0 comments on commit c2025ce

Please sign in to comment.