Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during wrapup: Can't subset .data outside of a data mask context. #5

Open
tfalcs opened this issue Jul 27, 2022 · 0 comments
Open

Comments

@tfalcs
Copy link

tfalcs commented Jul 27, 2022

Hi, I'm running this IBD characterization study on CUIMC data and encountered an issue I need help resolving. Using options(error = recover) feature of R, I think I've pinpointed the function as well as the segment of the function script that is causing issues. In the 'getTimeDistributions' function, it looks like during the assignment to the objects 'results', the code is selecting for columns by way of exclusion (that is, select(-a)). However, and I"m not sure this is actually a problem, the code is also using a . (dot) before the reference of the dataset. This same .data is being referenced in the error message, stated below as well as in the title of this issue. I wanted to play around with this function and temporarily comment out these lines of code for corresponding lines of code that do not use the . (dot) and see what happens. But It is read only for me and I don't know how to get around that (probably for good reason). I was wondering if any could chime in with ideas of what is going on? Would be grateful for the help and to learn what's going on. @msuchard @cyanover @schuemie

Selection: 4
Called from: stop(fallback)
Browse[3]> data <- FeatureExtraction::getDbCovariateData(connection = connection,

  • oracleTempSchema = tempEmulationSchema, cdmDatabaseSchema = cdmDatabaseSchema, 
    
  • cohortDatabaseSchema = cohortDatabaseSchema, cohortTable = cohortTable, 
    
  • cohortId = cohortIds, covariateSettings = covariateSettings, 
    
  • cdmVersion = cdmVersion, aggregated = TRUE)
    

Constructing features on server
|=============================================================================================================================================================================================================| 100%
Executing SQL took 8.94 secs
Fetching data from server
Fetching data took 0.348 secs
Browse[3]> if (is.null(data$covariatesContinuous)) {

  • result <- tidyr::tibble()
    
  • }
    Browse[3]> else {
    Error during wrapup: unexpected 'else' in " else"
    Error: no more error handlers available (recursive errors?); invoking 'abort' restart
    Browse[3]> result <- data$covariatesContinuous %>% dplyr::inner_join(data$covariateRef,
  •   by = "covariateId") %>% dplyr::select(-.data$conceptId, 
    
  •   -.data$analysisId, -.data$covariateId, -.data$result$countValue) %>% 
    
  •   dplyr::rename(timeMetric = .data$covariateName, 
    
  •     cohortId = .data$cohortDefinitionId) %>% dplyr::collect()
    

Error during wrapup: Can't subset .data outside of a data mask context.
Error: no more error handlers available (recursive errors?); invoking 'abort' restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant