18 Donors who aren’t degreeholders
# i always begin by loading the disco engine if it isn't already loaded
library(discoveryengine)
We have what looks like an easy request:
Find donors to the School of Information who are not SIM degree holders.
Having already looked up the codes, you immediately think:
gave_to_area(SIM) %but_not% has_degree_from(LI)
Unfortunately, as you begin reviewing the results, you notice that you produced a list that includes spouses of degree holders who received credit for household gifts to SIM.
To get around the issue, use the married_to
widget (a higher-order widget). Note the use of parentheses to ensure the correct interpretation:
alum = has_degree_from(LI)
non_alum_donor =
gave_to_area(SIM) %but_not%
(alum %or% married_to(alum))