ohdsi / capr Goto Github PK
View Code? Open in Web Editor NEWCohort definition Application Programming in R
Home Page: https://ohdsi.github.io/Capr
License: Apache License 2.0
Cohort definition Application Programming in R
Home Page: https://ohdsi.github.io/Capr
License: Apache License 2.0
First of all I'd like to state that I'm not too familiar with S4 classes, but I am comfortable with R6.
Looking at the code, the show
methods of the following objects are identical:
Could they inherit from an opAttributeSuper
class, which implements this method, and any other identical methods?
If similar implementations exist elsewhere in the package I think this would significantly change code duplicity.
I see:
CirceR: Can't find package called CirceR.
Which is a bit odd because CirceR is in the Enhances section. Normally this problem would be solved by adding a Remotes section to point to ohdsi/CirceR, but it seems you're going to CRAN (which is a good idea), but CRAN won't allow a Remotes section. Not sure how other people solve this.
I'm starting to use Capr and it's great, but it seems the best documentation is the unit tests ;-)
For example, this code in the README is incorrect, as the exit criteria must be created with the exit()
function. Similarly, this example in the vignette appears incorrect because attrition entries need to be created with withAll()
(for example).
To make sure I have the right concepts in my concept set expression, I'd like to see the concept names. Of course, at the start this information is not available:
sitagliptin <- cs(
descendants(1580747),
name = "Sitagliptin"
)
sitagliptin
# conceptId includeDescendants isExcluded includeMapped
# <int> <lgl> <lgl> <lgl>
# 1 1580747 TRUE FALSE FALSE
However, I would have expected to see the information after calling getConceptSetDetails()
:
sitagliptin <- getConceptSetDetails(sitagliptin, connection, cdmDatabaseSchema)
sitagliptin
# conceptId includeDescendants isExcluded includeMapped
# <int> <lgl> <lgl> <lgl>
# 1 1580747 TRUE FALSE FALSE
The information is there, in the internal structure of the object. Could the concept name (and other concept information) be shown when available?
After installing the command vignette("CAPR_tutorial", package = "Capr") says that there is not a vignette.
Right now there are some ugly transformations needed to plug the output of Capr
into CohortGenerator
, which looks something like this:
library(CirceR)
exposureCohorts <- tibble(cohortId = c(1,2),
cohortName = c("Celecoxib", "Diclofenac"),
json = c(as.json(celecoxibCohort), as.json(diclofenacCohort)))
exposureCohorts$sql <- sapply(exposureCohorts$json,
buildCohortQuery,
options = createGenerateOptions())
Where celecoxibCohort
and diclofenacCohort
are Capr
cohorts, and exposureCohorts
can be used directly in CohortGenerator::generateCohortSet()
.
Looping in @anthonysena : Any thoughts? Perhaps Capr
can add a function that creates CohortGenerator
input tables from a list of cohorts, or CohortGenerator
can accept a list of Capr
cohorts? Why does CohortGenerator
need cohort names anyway?
library(DatabaseConnector)
library(Capr)
connectionDetails <- Eunomia::getEunomiaConnectionDetails()
connection <- connect(connectionDetails)
#> Connecting using SQLite driver
gibleed <- cs(descendants(192671))
gibleedCohort <- cohort(entry = entry(condition(gibleed)))
as.json(gibleedCohort)
#> Error: 'list_flatten' is not an exported object from 'namespace:purrr'
disconnect(con)
#> Error in disconnect(con): object 'con' not found
Created on 2023-07-01 with reprex v2.0.2
Hi,
It seems that when using the Op="bt" in createOcurrenceStartDateAttribute, the Extent parameter is not actually used in JSON, which causes errors.
dx_id_Query <- createConditionOccurrence(conceptSetExpression = dx_code_omop,
attributeList = list(createOccurrenceStartDateAttribute(Op = "bt",
Value = "2020-01-01",
Extent = "2020-12-31")))
Ocurrence start date in JSON:
\n"OccurrenceStartDate": {
\n "Value": "2020-01-01",
\n"Op": "bt"
\n}
Expected behavior: When i copy the json expression of a cohort definition generated by Capr and paste it in Atlas UI for cohort definition (under export tab, reload) - Atlas cohort definition editor should be able to parse the JSON and render the definition.
Actual behavior: Atlas is unable to parse the JSON from Capr.
Reproducible example:
Primary Criteria :
conceptsWithKeyWord <- Capr::lookupKeyword(
keyword = "Diabetes",
search_type = "any",
cdmDatabaseSchema = cdmDatabaseSchema
)
conceptSetExpression <- Capr::createConceptSetExpression(conceptSet = conceptsWithKeyWord,
Name = "Diabetes Key Word",
includeDescendants = TRUE)
attributeFirst <- Capr::createFirstAttribute(logic = TRUE)
attributeAge <- Capr::createAgeAttribute(Op = "gt", Value = "10")
conceptSetConditionOccurrence <-
Capr::createConditionOccurrence(conceptSetExpression = conceptSetExpression,
attributeList = list(attributeFirst, attributeAge))
primaryCriteria <-
Capr::createPrimaryCriteria(
Name = "Primary Criteria Using Condition Occurrence concept set",
ComponentList = list(conceptSetConditionOccurrence),
ObservationWindow = Capr::createObservationWindow(0L, 0L),
Limit = "First"
)
Inclusion Rule :
irs <- Capr::createInclusionRules(Name = "Inclusion Rules",
Contents = list(),
Limit = "First")
End Strategy :
es <- Capr::createDateOffsetEndStrategy(offset = 0, eventDateOffset = "EndDate")
Cohort Era :
cohortEra <- Capr::createCohortEra(EraPadDays = as.integer(1))
Creating Definition :
desc <- "Description for Testing Cohort"
Final Cohort Definition:
cd <- Capr::createCohortDefinition(
Name = "Testing Cohort",
Description = desc,
PrimaryCriteria = pc,
InclusionRules = irs,
EndStrategy = es,
CohortEra = cohortEra
)
Hi all, I am trying to limit my cohort to conditions with observation start date in between 2013-01-01 to 2022-12-31, using the startdate attribute, but it didn't work. Below is my code using eunomia as an example. As you can see I still gets conditions with cohort_start_date below 2013. I wonder is my code correct?
CDMConnector::downloadEunomiaData(
pathToData = here::here(),
overwrite = TRUE
)
usethis::edit_r_environ()
db <- dbConnect(duckdb(), dbdir = eunomia_dir())
cdm <- cdm_from_con(db, cdm_schema = "main", write_schema = "main")
concept_sets <- list(gibleed = cs(descendants(192671), name = "gibleed"))
# generate Capr cohort
condition_cohort_template <- function(concept_set) {
cohort(
entry = entry(
conditionOccurrence(concept_set,startDate(bt(as.Date("2013-01-01"),as.Date("2022-12-31"))), firstOccurrence()),
observationWindow = continuousObservation(priorDays = 365)
,
primaryCriteriaLimit = "All"
),
exit = exit(endStrategy = observationExit())
)
}
# Write a loop
cohortsConditions <- list()
for (i in 1:length(concept_sets)) {
cohortsConditions[[i]] <- condition_cohort_template(concept_sets[[i]])
}
# Lets add names to the list of cohorts
names(cohortsConditions) <- names(concept_sets)
cdm <- generateCohortSet(cdm, cohortsConditions, "cohort_conditions", overwrite = TRUE)
cdm$cohort_conditions
> cdm$cohort_conditions
# Source: table<main.cohort_conditions> [?? x 4]
# Database: DuckDB 0.8.1 [miked@Windows 10 x64:R 4.3.1/C:\Users\miked\AppData\Local\Temp\RtmpGcDKbM/nfqdmjxy]
cohort_definition_id subject_id cohort_start_date cohort_end_date
<int> <dbl> <date> <date>
1 1 80 1974-10-27 2019-04-15
2 1 733 1980-07-22 2018-08-30
3 1 1259 1981-10-16 2019-01-03
4 1 1265 2018-02-20 2018-02-21
5 1 1756 2013-07-14 2018-08-26
6 1 1967 1994-05-17 2019-04-26
7 1 2786 1959-12-27 2015-12-19
8 1 2834 1972-03-16 1999-12-11
9 1 3216 1995-12-22 2018-10-05
10 1 3224 2002-01-26 2019-06-07
# i more rows
# i Use `print(n = ...)` to see more rows
do R check get rid of all notes and warnings.
most warnings are scoping issues
Finish suite of create Attribute Commands.
Attribute Types include:
-Op (Dates and Numeric) --> check fully compatible
-Logical (First and Exclude) --> compatible
-Correlated Criteria --> compatible
-Source Concept --> compatible
-Concept (using vocabularies) --> check fully compatible
-Text Filler --> not compatible
Functions accessing the OMOP Vocabulary need a database connection parameter (i.e. lookup functions). Test and update to OHDSI standard
Command to console print and preview the CAPR object
I'd like to pick the first exposure to a drug, and then require a washout period. I realized that this:
sitagliptinNewUsers <- cohort(
entry = entry(
drug(sitagliptin),
primaryCriteriaLimit = "First",
observationWindow = continuousObservation(priorDays = 365)
),
attrition = attrition(
"prior T2DM" = withAll(
atLeast(1, condition(t2dm), duringInterval(eventStarts(-Inf, 0)))
)
),
exit = exit(endStrategy = drugExit(sitagliptin, persistenceWindow = 30, surveillanceWindow = 0))
)
actually first applies the 365 washout, then picks the first occurrence. So if someone was exposed on days 1 and 366 relative to observation_period_start_date, the resulting cohort will have an entry for day 366. Instead, this person should not be included in the cohort (first exposure is on day 1, there is less than 365 days of prior observation on day 1).
I tried using firstOccurrence()
:
sitagliptinNewUsers <- cohort(
entry = entry(
drug(sitagliptin, firstOccurrence()),
observationWindow = continuousObservation(priorDays = 365)
),
attrition = attrition(
"prior T2DM" = withAll(
atLeast(1, condition(t2dm), duringInterval(eventStarts(-Inf, 0)))
)
),
exit = exit(endStrategy = drugExit(sitagliptin, persistenceWindow = 30, surveillanceWindow = 0))
)
but then as.json()
throws an error:
as.json(sitagliptinNewUsers)
# Error in `purrr::map()`:
# i In index: 1.
# Caused by error in `purrr::map()`:
# i In index: 1.
# Caused by error in `as.list.default()`:
# ! no method for coercing this S4 class to a vector
add design doc md as article in pkg site. design doc includes intent of package, user, design specs, roadmap
I think Capr is a valuable resource that I would like to see added to the OHDSI HADES library. If you agree to add Capr to HADES, I would request some modifications to the repo:
remotes::install_github("ohdsi/Capr")
. (see example Remotes section here). No need to add DatabaseConnector, as it is available in CRAN.remotes::install_github("ohdsi/Capr")
installs the latest released version.Need to add an open-ended death query to Primary Criteria and Censoring Criteria. Query is used to search all deaths in death domain. Common censoring criteria component. Example below:
dd <- Capr::createDeath()
cen <- Capr::createCensoringCriteria(Name = "Death Censoring Criteria",
ComponentList = list(dd))
#yields indexing error for concept set expressions
When using
AgeAtt <- createAgeAttribute(Op = "bt", Value = 40, Extent = 65)
Age40And65Group <- createGroup(Name = "Between 40 and 65 years old",
type="ALL",
criteriaList = NULL,
demographicCriteriaList = list(AgeAtt),
Groups = NULL)
the Extent number is not written in the JSON file.
Mature concept lookup functions to handle ad hoc concept searches (when the concept id is not known in advanced) and improve functions for setting concept set expression mapping (i.e. include descendants, include mapped and exclude)
For example, createCohortDefinition()
has capitalized argument names, such as Name
and PrimaryCriteria
, while createDrugExposure()
has non-capitalized argument names such as conceptSetExpression
and attributeList
. createGroup()
even mixes the two.
For consistency with the HADES style guide I recommend using lowercase first letters for all arguments.
We're looking to use a calendar date range when defining cohort entry as is done in ATLAS, and are curious if that functionality is supported in Capr.
For example, how could we update the following Type 2 Diabetes definition (from https://ohdsi.github.io/Capr/articles/Examples.html#type-2-diabetes-mellitus) to also require that the observation of cs0
must occur between January 1, 2022 and December 31, 2023?
library(Capr)
cs0 <- cs(descendants(443238, 201820, 442793),
descendants(exclude(195771, 201254, 435216, 761051, 4058243, 40484648)),
name = "Type 2 diabetes mellitus (diabetes mellitus excluding T1DM and secondary)")
ch <- cohort(
entry = entry(
conditionOccurrence(cs0),
observationWindow = continuousObservation(priorDays = 365)
),
exit = exit(
endStrategy = observationExit()
)
)
We looked through the package documentation in https://ohdsi.github.io/Capr/reference/index.html but couldn't find an example that seemed to match. Any tips?
Here's the ATLAS UI version (with a different concept set but you get the idea) we're trying to replicate in Capr
When using an opAttribute within a query, Capr coerces any value to an integer. Needs to allow for a numeric value with a decimal.
Example
att <- Capr::createValueAsNumberAttribute(Op = "gt", Value = 3.39)
att@CriteriaExpression[[1]]@Contents$Value # gives a value of 3
We (https://github.com/nimirea) and I suspect that the examples in https://github.com/OHDSI/Capr/blob/main/vignettes/Examples.Rmd may be out of date with the latest version of the package (2.0.5).
Namely, when we executed the example code on a CDM, we found that without wrapping the arguments to attrition()
with withAll()
calls, the attrition information was not properly applied in the generated cohort.
For example, in the following lines, we suspect the lines need to be wrapped with withAll()
for the inclusion criteria to be correctly applied.
Lines 56 to 59 in fa03ba0
I'm curious if the developers agree these examples are out of sync with the latest version or not. Maybe we're missing something else.
I can include the actual JSON comparison if it's helpful.
Is there a way to query the device domain in the same way we query observations or procedures?
do cran submission using devtools::submit_cran()
. before that run devtools::check_win_release()
DrugExit class fails coercion. Check coercion of all end strategies and add unit tests
Several functions like 'getConceptCodeDetails()' have an oracleTempSchema
argument. First of all, please make sure this is really necessary. Are these functions using temp tables? Second, oracleTempSchema
has been deprecated across HADES. Please use `tempEmulationSchema' instead, and set the default value like this.
Although there is no official guideline for repo names, in general we tend to use camelCase. Would you consider renaming to 'Capr'?
If Capr is to be an R package then there definitely are guidelines for R code.
I am interested in creating cohorts with inclusion definitions that rely on health economics data tables such as PAYER_PLAN_PERIOD (https://ohdsi.github.io/CommonDataModel/cdm54.html#Health_Economics_Data_Tables)
When I look at the domains supported by Capr listed in https://ohdsi.github.io/Capr/articles/capr_objects.html#definition, I only see support for clinical data tables and none for Health Economics.
Is there Capr support for building cohorts leveraging Health Economics Data tables?
Spotted a couple of places in code examples where the =
operator was mistakenly typed as -
See
Capr/vignettes/capr_objects.Rmd
Line 127 in fa03ba0
and
Capr/vignettes/capr_objects.Rmd
Line 141 in fa03ba0
looks like eval = FALSE
on both of these chunks which is likely why it wasn't caught.
For a next release, it might be good to fix these:
checkCmInstallation()
function that is not part of Capr.The function createConceptSetExpression puts the same CodesetId.
Example:
DMDx_hist <- getConceptIdDetails(conceptIds = c(40769338, 43021173, 42539022, 46270562),
connection = cdm_bbdd,
vocabularyDatabaseSchema = cdm_schema) %>%
createConceptSetExpression(Name = "History of Diabetes Diagnosis",
includeDescendants = TRUE)
T1Dx <- getConceptIdDetails(conceptIds = c(201254, 435216, 4058243, 40484648),
connection = cdm_bbdd,
vocabularyDatabaseSchema = cdm_schema) %>%
createConceptSetExpression(Name = "Type 1 Diabetes Diagnosis",
includeDescendants = TRUE)
DMDx_hist@ConceptSetExpression[[1]]@id #"16101412-f225-4cdd-830a-344e094563e8"
T1Dx@ConceptSetExpression[[1]]@id #"16101412-f225-4cdd-830a-344e094563e8"
I am on Capr 2.0.7 and I tried following the example in
Lines 136 to 179 in e44ec1c
However it returned an error "Error in is.unit(x) : argument "x" is missing, with no default"
I was able to reduce it to the following calls:
library(Capr)
cs3 <- cs(descendants(4184637, 37059902),
name = "Hemoglobin A1c (HbA1c) measurements")
measurement(cs3, valueAsNumber(bt(6.5, 30)), unit(units = "%"))
This gave me the error
Error in is.unit(x) : argument "x" is missing, with no default
I also tried running the code in
Capr/tests/testthat/test-attributes.R
Line 236 in e44ec1c
> tt <- unit(8713L)
Error in unit(8713L) : argument "units" is missing, with no default
My hypothesis is that there has been a breaking to unit()
and the examples need to be updated. Is that right?
Create validObject checks for S4 objects
Align with circe-be offset-date PR
Change that impacts Capr, addition of Date Adjustment field
Aim to release parallel to circe-be release
For example when trying to include a createConditionSourceConceptAttribute
in a PrimaryCriteria
:
library(Eunomia)
library(Capr)
connectionDetails <- getEunomiaConnectionDetails()
connection <- connect(connectionDetails)
index_codeset <- getConceptIdDetails(conceptIds = 0, connection = connection, vocabularyDatabaseSchema = vocabularyDatabaseSchema, mapToStandard = F) %>%
createConceptSetExpression(Name = "Index Event", includeDescendants = F)
source_codeset <- getConceptIdDetails(conceptIds = 0, connection = connection, vocabularyDatabaseSchema = vocabularyDatabaseSchema, mapToStandard = F) %>%
createConceptSetExpression(Name = "Source Event", includeDescendants = F)
attribute_list <- list()
attribute_list[[1]] <- createSourceConceptAttribute("ConditionOccurrence", source_codeset)
index_event <- createConditionOccurrence(conceptSetExpression = index_codeset, attributeList = attribute_list)
primary <- createPrimaryCriteria(Name = "Primary Criteria", ComponentList = list(index_event), ObservationWindow = createObservationWindow(0L,0L), Limit = "fist")
cd <- createCohortDefinition(Name = "My cohort", Description = "My cohoft", PrimaryCriteria = primary)
compileCohortDefinition(cd)
Error in names(att) <- x@Name : 'names' attribute [1] must be the same length as the vector [0]
I did some digging and this is because only the first concept set is recognised during createPrimaryCriteria
, see here.
A quick fix can be implemented here but it might be worth considering the same issue will manifest elsewhere.
Happy to do this and make a PR if you believe it is suitable solution.
PS. Many thanks for the work on this package, it is really cool. I am starting to utilise it a fair but and would be happy to contribute other things that come up.
procedure() function is not able to take procedure conceptset to generate the query. It looks like procedure is not a valid domain.
procedure(c4)
Error in validityMethod(object) :
object@domain %in% validDomains is not TRUE
From #77 @chrisknoll has posed an interesting way of viewing Capr
potentially through R6 via a pure OOP system. The purpose of this post is to
a) understand the benefits of switching to R6
for Capr
and
b) consider the impact of R6
within HADES...when/where to use it, why is it beneficial and ultimately does it even matter
I am hoping to get some feedback or thoughts from others @chrisknoll, @azimov, @ablack3, @anthonysena, @schuemie. I know a post was made a while back referencing this same topic.
Thoughts on OOP in context of Capr
Currently Capr
is written in S4 this was done for two (at this point, flimsy) reasons:
R6
was not available at the time. R still used ReferenceClass
as its pure OOP system. I explored this in early Capr
development but opted to go the S4
routeS4
maintains the "feel" of R. Where as R6
is more amenable to programmers coming from the java and python worlds. S4
is a stricter version of S3
which does a better job of working in a functional programming pipeline. When Capr
was originally created it was intended to heavily leverage the pipe operator %>%
however this proved to be rather awkward.Resources to give context to S4 and R6 can be found in chapters 14, 15, and 16 of Advanced R. While the strengths of S4 can be found here.
Starting at Capr
v2, there was an intentional effort to transition the feel of the code away from piping and towards nested functions. The construction of cohorts would hence feel like building the ui of a shinyDashboard
. A dashboard requires a header, sidebar and body. Within each section the user provides context on the look by adding text, output, boxes etc. Similar to a cohort definition where the user is constructing sections of the definition...the entry, attrition, exit and era. An example of what Capr
code should look like now is show below:
library(Capr)
cd <- cohort(
#entry event (i.e. primary criteria)
entry = entry(
drugExposure(metformin, male()), # index query of metformin users who are male
observationWindow = continuousObservation(priorDays = 365L), #365 min prior obs
primaryCriteriaLimit = "All" # use all index events
),
# attrition to index event (i.e. inclusion rules)
attrition = attrition(
# no t1d any time prior
'no t1d' = withAll( # start group
exactly( # start criteria (i.e. count)
x = 0,
query = conditionOccurrence(t1d),
aperture = duringInterval(
startWindow = eventStarts(a = -Inf, b = 0, index = "startDate")
)
)
),
expressionLimit = "All" # include all events for attrition
),
# exit when the person leaves the cohort
exit = exit(
endStrategy = drugExit(
conceptSet = metformin,
surveillanceWindow = 30L
) # create metformin era to determine exit
),
# era logic on how to collapse multiple events
era = era(eraDays = 30L) # 30 days of metformin use builds an era (bit redundant)
)
If Capr
were to switch to R6
the syntax would look more like this:
cd <- cohort$new(
#entry event (i.e. primary criteria)
entry = entry$new(
#list of queries or single query
list(
drugExposure$new(
conceptSet = metformin,
attributes =
list(
male$new()
)
),
observationWindow = continuousObservation$new(prior = 365L),
primaryCriteriaLimit = limit$new(type = "All"),
additionalCriteria = NULL # placeholder
qualifyingLimit = limit$new(type = "All")
)
),
# attrition to index event (i.e. inclusion rules)
attrition = attrition$new(
list(
group$new(
name = 'no t1d occurrence',
type = "all",
int = NULL, #placeholder
criteria = criteria$new(
type = "exactly",
int = 1,
query = conditionOccurrence$new(
conceptSet = t1d
),
aperture = aperture$new(
startWindow = eventStarts$new(a = -Inf, b = 0, index = "startDate"),
ignoreObservationPeriod = FALSE # placeholder
)
)
)
)
),
# exit when the person leaves the cohort
exit = exit$new(
endStrategy = drugExit$new(
conceptSet = metformin,
surveillanceWindow = 30L
),
censoringCriteria = NULL #placeholder
),
# era logic on how to collapse multiple events
era = era$new(
eraDays = 30L
)
)
Each class has a new object method where we describe its details. Classes can have further methods such as json coercion, sql builder, print statement, and plot functions. This would be quite nice. I am conscious of not overlapping too much with CirceR
.
Thoughts on R6
My main hesitation with R6
is that it removes the "feel" of R. R works best in S3
when you take advantage of its "pipe-ability" and functional programming attributes. Forcing R code into a pure OOP system may tune out "tidy-verse" programmers trying to enter the OHDSI software space. Think there is legitimate fear here given the design of the DARWIN software which are quite "tidy-verse" heavy. Not that its any sort of competition.
Having said this, I am beginning to realize the benefits of using R6
particularly if we begin to think about complex objects (circe definition) and pipelines (strategus modules). Having a strictly encapsulated objects makes it easier to force a complex routine across a network.
This post has gone way too long (of which I have accidentally deleted it twice) but maybe it starts a conversation to think about the HADES codebase as it becomes more and more complex :)
Circe 1.11.0 adds a new feature to date-offset start/end dates of 'query' criteria. This allows you to override an end date of an index event, or re-assign a start date to some other time. Example: A pregnancy confirmation event may indicate 12-weeks, so you may want to offset the start date of this event to indicate a pregnancy start by 7*12=84d.
The main change of the of the API is that all Criteria now have a DateAdjustment
field, used here.
The DateAdjustment class is described here.
Is it possible to create the Capr R objects for cohorts/concept sets directly from the JSON representation?
My desire is to:
From my preliminary review of the documentation and vignettes, I didn't find an easy way to use the JSON design directly in Capr? I was hoping for something like Capr::loadCohortDefinitionJson(json)
and it would return the Capr cohort definition object.
I'm trying out the README example of your package.
When executing the following command
writeCohort(ch, path)
an error occurs:
Error: 'list_flatten' is not an exported object from 'namespace:purrr'
My environment:
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.2
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Capr_2.0.2 rlang_1.0.6 openxlsx_4.2.4 forcats_0.5.1
[5] stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4 readr_2.1.4
[9] tidyr_1.1.4 tibble_3.1.5 ggplot2_3.4.0 tidyverse_1.3.1
[13] SqlRender_1.13.1 DatabaseConnector_6.0.0
I'm interested in applying inclusion criteria "is at least 18 at index"
I bet I want to leverage the age()
function (
Lines 328 to 343 in fa03ba0
I looked at the examples in https://ohdsi.github.io/Capr/articles/Examples.html but didn't find one. Also couldn't seem to find one anywhere else in the repo.
Any tips? Thanks!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.