标签: r
我有一个泰坦尼克号数据框,我想编码一个男性幸存者的直方图。数据帧具有5个变量:name(factor),pclass(factor),age(num),sex(factor)和survived(int)
name(factor)
pclass(factor)
age(num)
sex(factor)
survived(int)
我想做
thetitanic[(thetitanic$Sex==“male”) & (thetitanic$Survived==“1”),]
所有年龄titanic$Ageinto的直方图。当我们只能在直方图中使用数字矢量时,该怎么办?
titanic$Ageinto