我想知道是否有任何直接方法可以做到这一点:
AB.births = births.can_prov[births.can_prov$Area =="AB",]
BC.births = births.can_prov[births.can_prov$Area =="BC",]
MB.births = births.can_prov[births.can_prov$Area =="MB",]
NB.births = births.can_prov[births.can_prov$Area =="NB",]
NL.births = births.can_prov[births.can_prov$Area =="NL",]
NT.births = births.can_prov[births.can_prov$Area =="NT",]
Area.Birth是基于另一个数据帧的Area变量的新数据帧。
基本:
Area.births = births.can_prov[births.can_prov$Area =="Area",]