Skip to content

Commit

Permalink
lag() function removed from cor_table
Browse files Browse the repository at this point in the history
  • Loading branch information
hanecakr committed May 25, 2023
1 parent c320e08 commit 16b3be8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .Rproj.user/429CC01A/pcs/source-pane.pper
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"activeTab": 7
"activeTab": 6
}
4 changes: 2 additions & 2 deletions .Rproj.user/429CC01A/pcs/windowlayoutstate.pper
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"left": {
"splitterpos": 296,
"splitterpos": 275,
"topwindowstate": "NORMAL",
"panelheight": 937,
"windowheight": 975
},
"right": {
"splitterpos": 349,
"splitterpos": 348,
"topwindowstate": "NORMAL",
"panelheight": 937,
"windowheight": 975
Expand Down
2 changes: 1 addition & 1 deletion .Rproj.user/429CC01A/pcs/workbench-pane.pper
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"TabSet1": 4,
"TabSet1": 0,
"TabSet2": 0,
"TabZoom": {}
}
6 changes: 3 additions & 3 deletions R/cor_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cor_table <-
sort_by = "t_Ho") #c("glk", "t_St", "t_BP", "t_Ho", "r_pearson"))
{
# to avoid notes in CMD check
pnorm <- lag <- cor <- select <- series <- reference <- NULL
pnorm <- cor <- select <- series <- reference <- NULL

### checks
x_ori <- x
Expand Down Expand Up @@ -183,10 +183,10 @@ cor_table <-
colnames(tHo_mat) <- names(y)

if ("t_Ho" %in% values) {
wuch_x <- apply(x, 2, function(x) {x / lag(x)} )
wuch_x <- apply(x, 2, function(x) {x / c(NA, x[-length(x)])} )
wuch_x <- 100 * log10(wuch_x)

wuch_y <- apply(y, 2, function(x) {x / lag(x)} )
wuch_y <- apply(y, 2, function(x) {x / c(NA, x[-length(x)])} )
wuch_y <- 100 * log10(wuch_y)

r <-
Expand Down

0 comments on commit 16b3be8

Please sign in to comment.