ACE Analytics: 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:

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.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 have an update available. You don’t usually have to update any packages, but you can choose to update some or all of your packages if you wish. Follow the prompt to make any updates you choose. 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.

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[] <- lapply(data, as.character)
data=data %>%
group_by(module) %>%
data_averages=proc_by_module(data, rm_outlier_rts_range=c(200,NA),verbose=TRUE)

> data=load_ace_bulk(path, pulvinar =TRUE)
Error: No common type for `x$condition` <character> and `y$condition` <logical>.

This error has most often occurred when processing legacy ACE Classroom data downloaded from the UCSF pulvinar server If you get an error related to no common type for condition, this is likely due to the condition column being empty for a module. SpatialSpan and BackwardSpatialSpan are the most likely culprits, but it could be any module. Check the individual module files and enter a character string into the condition module for all lines with data (e.g., you might enter ‘forward’ for the condition in SpatialSpan and ‘backward’ for BackwardSpatialSpan). It must be a character string and not a number. Once the files have been updated, the code should work.

> data_averages = proc_by_module(data, verbose=TRUE, app_type = 'explorer')
Error: Problem with `mutate()` column `demos`.
ℹ `demos = map(1:n(), ~df$data[df$module == DEMOS][[1]])`.
x subscript out of bounds

This error occurs if the demographics module wasn’t loaded in the load_ace_bulk step. Please ensure that the demographics file is located in the path directory you specified in the load_ace_bulk step. For more information on organizing files, please see our Organizing Files Guide.

Get Involved

Neuroscape relies on support and participation from you to make this research possible.

Become a participant, donor, or volunteer.

Join Us