Closed gowthamrao closed 4 years ago
https://github.com/OHDSI/FeatureExtraction/blob/cd516ed0a938143d434871f2df677bc47e83982d/R/GetCovariates.R#L64
> data # CovariateData object Cohort of interest ID: 323432 Inherits from Andromeda: # Andromeda object # Physical location: C:\Users\ADMIN_~2\AppData\Local\Temp\2\RSNV\file1529.sqlite Tables: $analysisRef (analysisId, analysisName, domainId, startDay, endDay, isBinary, missingMeansZero) $covariateRef (covariateId, covariateName, analysisId, conceptId) $covariates (covariateId, sumValue, averageValue) $covariatesContinuous (covariateId, countValue, minValue, maxValue, averageValue, standardDeviation, medianValue, p10Value, p25Value, p75Value, p90Value)
but...
!is.null(data$covariates) returns
!is.null(data$covariates)
Error in UseMethod("tbl") : no applicable method for 'tbl' applied to an object of class "CovariateData"
Reason: the returned object data is
> isS4(data) [1] TRUE > class(data) [1] "CovariateData" is(data) [1] "CovariateData" "Andromeda" "SQLiteConnection" "DBIConnection" "DBIObject" > is(data, 'Andromeda') [1] TRUE > slotNames(data) [1] "ptr" "dbname" "loadable.extensions" "flags" "vfs" "ref" [7] "bigint"
is of class CovariateData because of https://github.com/OHDSI/FeatureExtraction/blob/cd516ed0a938143d434871f2df677bc47e83982d/R/GetCovariates.R#L108
How to read the object data of class CovariateData like data$covariates?
data$covariates
Trying to solve this issue: https://github.com/OHDSI/CohortDiagnostics/issues/48
I'm not able to reproduce this. Did you call library(FeatureExtraction) for running this code?
library(FeatureExtraction)
Looks like R needed a restart. Closing this issue.
https://github.com/OHDSI/FeatureExtraction/blob/cd516ed0a938143d434871f2df677bc47e83982d/R/GetCovariates.R#L64
but...
!is.null(data$covariates)
returnsReason: the returned object data is
is of class CovariateData because of https://github.com/OHDSI/FeatureExtraction/blob/cd516ed0a938143d434871f2df677bc47e83982d/R/GetCovariates.R#L108
How to read the object data of class CovariateData like
data$covariates
?Trying to solve this issue: https://github.com/OHDSI/CohortDiagnostics/issues/48