Create rules based on data.I have a system that picks out on date,based on some rules. I then want to generate a new rule based on this date and apply the rule to a new dataset.
datePicked={{2008, 3, 21, 0, 0, 0.}}rule=datePicked/. {t_, n_, o_, b___} :> HoldForm[{t, n, v_, b} /; v <= o];d=DateRange[{2008, 2, 21, 0, 0, 0.`}, {2008, 3, 21, 0, 0, 0.`}]Cases[d,#]&@@rule
Problem is that the rule I have made is not general, it has assigned the $ to v. How can I make it general?