Showing 3 of 5 files from the diff.
Other files ignored by Codecov
NAMESPACE has changed.
.DS_Store has changed.

@@ -27,7 +27,6 @@
Loading
27 27
#' @import data.table
28 28
#' @importFrom dplyr select
29 29
#' @importFrom dplyr left_join
30 -
#' @importFrom dtplyr tbl_dt
31 30
#' @importFrom dplyr %>%
32 31
#' @export
33 32
#'
@@ -61,7 +60,7 @@
Loading
61 60
62 61
  # message("Fits EZ-diffusion model (Wagenmaker et al., 2007, Psychonomic Bulletin & Review).\nResponses or choice must be coded as 0 (lower bound) or 1 (upper bound).")
63 62
64 -
  data <- tbl_dt(data)
63 +
  data <- data.table(data)
65 64
66 65
  # create new variables
67 66
  data$rtCol <- data[, get(rts)]
@@ -111,7 +110,7 @@
Loading
111 110
  ddmRt <- data[response_num == 1, .(rt = mean(rtCol, na.rm = T), rtVar = stats::var(rtCol, na.rm = T)), by = c(id, group)]
112 111
113 112
  # calculate responses for each subject, each condition
114 -
  ddmAcc <- tbl_dt(data[, .(acc = mean(response_num, na.rm = T), n = .N), by = c(id, group)])
113 +
  ddmAcc <- data.table(data[, .(acc = mean(response_num, na.rm = T), n = .N), by = c(id, group)])
115 114
116 115
  if (sum(ddmAcc[, acc] %in% c(0.5, 1)) > 0) {
117 116
    n_corrected <- sum(ddmAcc[, acc] %in% c(0.5, 1))
@@ -169,7 +168,7 @@
Loading
169 168
    resultsFinal$temporary_subject <- NULL
170 169
  }
171 170
172 -
  return(tbl_dt(resultsFinal))
171 +
  return(resultsFinal)
173 172
174 173
}
175 174

@@ -35,8 +35,9 @@
Loading
35 35
36 36
  # compute standard deviation (sample version n = n [not n-1])
37 37
  stdev <- sqrt(sum((x - mean(x, na.rm = T))^2, na.rm = T) / sum(!is.na(x)))
38 -
  # compute absolute Z values for each value
39 -
  absZ <- abs(x - mean(x, na.rm = T)) / stdev
38 +
  # compute Z values for each value
39 +
  Zvals <- (x - mean(x, na.rm = T)) / stdev
40 +
  absZ <- abs(Zvals)
40 41
  # subset data that has absZ greater than the zCutOff and replace them with replace
41 42
  # can also replace with other values (such as max/mean of data)
42 43
  x[absZ > zCutOff] <- replaceOutliersWith
@@ -45,7 +46,7 @@
Loading
45 46
  if (showZValues) {
46 47
    message("Showing absolute z-scores for each value.")
47 48
    message(paste0(outliers, " outliers detected."))
48 -
    return(round(absZ, digits)) # if values == TRUE, return z score for each value
49 +
    return(round(Zvals, digits)) # if values == TRUE, return z score for each value
49 50
  } else if (outlierIndices) {
50 51
    message("Showing indices of outliers.")
51 52
    return(which(is.na(x)))

@@ -24,7 +24,7 @@
Loading
24 24
stderror <- function(data = NULL, measurevar, groupvars = NULL, na.rm = TRUE, conf.interval = 0.95, tonumeric = TRUE) {
25 25
26 26
  # convert to datatable and tibble
27 -
  data <- data.table(data)
27 +
  data <- data.table::data.table(data)
28 28
29 29
  # function to compute N without NAs
30 30
  length2 <- function(x, na.rm = FALSE) {
@@ -93,7 +93,6 @@
Loading
93 93
#' @return a data.frame
94 94
#' @description normWithin norms the data within specified groups in a data frame
95 95
#' @importFrom dplyr left_join
96 -
#' @importFrom dtplyr tbl_dt
97 96
#' @import data.table
98 97
#' @examples
99 98
#' \dontrun{
@@ -105,12 +104,13 @@
Loading
105 104
  # specified by betweenvars.
106 105
  # norm data (this function will only be used by seWithin, and won't have to be called directly)
107 106
108 -
  data <- tbl_dt(data)
107 +
  data <- data.table::data.table(data)
109 108
  setkeyv(data, idvar) # sort by idvar
110 109
111 110
  data.subjMean <- data[, .(unlist(lapply(.SD, mean, na.rm = na.rm))), by = c(idvar, betweenvars), .SDcols = measurevar] # compute mean for each subject
112 111
  setnames(data.subjMean, c(idvar, betweenvars,'subjMean'))
113 112
  dataNew <- left_join(data, data.subjMean)
113 +
  dataNew <- data.table::data.table(dataNew)
114 114
  setkeyv(dataNew, c(idvar, betweenvars)) # sort
115 115
116 116
  measureNormedVar <- paste0(measurevar, "Normed")
@@ -157,7 +157,6 @@
Loading
157 157
#' @importFrom dplyr tbl_df
158 158
#' @importFrom dplyr left_join
159 159
#' @importFrom dplyr mutate_if
160 -
#' @importFrom dtplyr tbl_dt
161 160
#' @importFrom stats sd
162 161
#' @export
163 162
#' @seealso \code{\link{stderror}}
@@ -232,7 +231,7 @@
Loading
232 231
    nWithinGroups <- prod(vapply(ndatac[,withinvars, drop = FALSE], FUN = function(x) length(levels(x)), FUN.VALUE = numeric(1)))
233 232
    correctionFactor <- sqrt( nWithinGroups / (nWithinGroups-1) )
234 233
235 -
    ndatacTbl <- tbl_dt(ndatac)
234 +
    ndatacTbl <- data.table::data.table(ndatac)
236 235
237 236
    # Apply the correction factor
238 237
    # setnames(ndatacTbl, c("sd", "se"), c("stdev", "stderror"))
@@ -245,7 +244,7 @@
Loading
245 244
    merged <- left_join(datac, ndatacTbl)
246 245
    merged <- mutate_if(merged, is.factor, as.character) #if factor, convert to character
247 246
    merged[order( unlist((merged[, 1])), decreasing =  F), ] #arrange by first column
248 -
    merged <- tbl_dt(merged)
247 +
    merged <- data.table::data.table(merged)
249 248
    message("Factors have been converted to characters.")
250 249
251 250
    # convert columns to numeric class if possible, else, leave as character
Files Coverage
R 4.01%
Project Totals (11 files) 4.01%
j30k779ltyhg4f8w
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
    patch:
10
      default:
11
        target: auto
12
        threshold: 1%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading