Troubleshooting

This page has some common errors people run into and their solution. We will add to this as we notice common issues.

A note on updating packages and R:

As with all software tools, there are often version updates of both R and the individual packages that can be used with R. We do our best to specify/notify you of the minimum version requirements to run aceR. However, there may be instances where a new update (either in packages or R) has been made available, but the aceR package or the packages/tools called on in the templates are not yet updated to be compatible with these changes. If you get errors or warnings related to packages not being available for a certain R version, it might be advisable to install an older version of R or the package to ensure compatibility. You can find links to older versions of R here, and can use google to find instructions for downloading older versions of specific packages.

Package installation:

> devtools::install_github("joaquinanguera/aceR")
Downloading GitHub repo joaquinanguera/aceR@master
These packages have more recent versions available.
Which would you like to update?

 1:   BH         (1.66.0-1 -> 1.69.0-1) [CRAN]   2:   clipr      (0.4.1    -> 0.5.0   ) [CRAN]
 3:   colorspace (1.3-2    -> 1.4-0   ) [CRAN]   4:   data.table (1.11.8   -> 1.12.0  ) [CRAN]
 5:   pillar     (1.3.0    -> 1.3.1   ) [CRAN]   6:   purrr      (0.2.5    -> 0.3.0   ) [CRAN]
 7:   readr      (1.1.1    -> 1.3.1   ) [CRAN]   8:   rlang      (0.3.0.1  -> 0.3.1   ) [CRAN]
 9:   tibble     (1.4.2    -> 2.0.1   ) [CRAN]  10:   CRAN packages only                      
11:   All                                       12:   None                                    

The above text is indicating that certain packages need to be updated before aceR can be installed. Choose "All" to update all packages. Note the list of packages you see may differ depending on which packages need updated.


> library(aceR)
Error: package or namespace load failed for ‘aceR’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘rlang’ 0.2.2 is already loaded, but >= 0.3.0 is required

If you get something like this, you may need to update a certain package. In this case, the error is pointing to the 'rlang' package. Re-installing/updating the rlang package solved the issue. Note you may need to re-start your R session to have package updates take effect.


Processing:

Error in is_character(x) : object 'module' not found

This may be an indication that you updated the aceR package, but didn't reset your R workspace or other dependent packages have not been updated. First, make sure the devtools package is up to date. Then try starting a new R session by going to 'session' -> 'restart session' or closing R, being sure to NOT SAVE your workspace and re-opening.


Error in mutate_impl(.data, dots) : 
  Evaluation error: Column `pid` can't be converted from integer to character.

This error is commonly found when trying to use the proc_by_module function, particularly when processing data from a csv file (rather than using the load_ace_bulk function). The proc_by_module function requires all data to be of type character and must be nested by module. Using the following code should resolve the problem:


data=read.csv(file="~/path/to/data.csv")'
data[] <- lapply(data, as.character)
data=data %>%
  group_by(module) %>%
  nest()
data_averages=proc_by_module(data, rm_outlier_rts_range=c(200,NA),verbose=TRUE)