View source: R/widget-age-between.R
age_between | R Documentation |
Find entities based on age
age_between(from = NULL, to = NULL)
from |
Minimum age, as a number |
to |
Maximum age, as a number |
If an entity has a birth date, then that will be used to calculate their age. If there is no birth date, then the degree year of their first degree is used. In order to calculate age from degree year, the widget adds 22 to the number of years since an undergraduate degree, and 25 to the number of years since a graduate degree. Entities without a birthday or degree year are completely ignored.
'from' and 'to' are optional, but you must provide at least one of them.
## entities between the age of 35 and 40
age_between(from = 35, to = 40)
## entities who are exactly 37 years old
age_between(from = 37, to = 37)
## anyone over the age of 55
age_between(from = 55)
## anyone under the age of 65
age_between(to = 65)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.