Closed cukarthik closed 2 years ago
Just checking if this is an issue and if so, then I'll work on a fix if it helps. Right now, I source my R script in order to get my package to take the variable I want to pass; this seems to work but is probably not the right solution.
Hi @cukarthik - my suggestion would be to include the table name as part of the covariate settings. The vignette here provides an example of this:
createLooCovariateSettings <- function(useLengthOfObs = TRUE) {
covariateSettings <- list(useLengthOfObs = useLengthOfObs)
attr(covariateSettings, "fun") <- "getDbLooCovariateData"
class(covariateSettings) <- "covariateSettings"
return(covariateSettings)
}
So you could change this to something like covariateSettings <- list(myTableForUseInCovariateBuilding= <value>)
and then use that from the custom function attr(covariateSettings, "fun") <- "getDbLooCovariateData"
.
Thanks @anthonysena, I believe I did this and had the error, but maybe I did something different. I'll try it again and let you know. Thanks.
Thanks again, @anthonysena . I think that worked. I think my initial issue might have been my environment. Thanks again!
I have a custom covariate that I'm working on that depends on a table that is loaded in the results schema, but my query fails when it tries to access resultsDatabaseSchema even though I specify it as a parameter to my getDbLooCovariateData function.
Based on this line of code, there is a fixed set of parameters that will be passed to my custom covariate. If this is the issue preventing adding additional parameters, I can try to create a PR.
@schuemie @anthonysena