Civ6

civ
可以使用以下代码创建该数据集: ```R # 创建数据框 data <- data.frame( age = c(39, 50, 38, 53, 28, 37, 49, 52, 31, 42), workclass = c("State-gov", "Self-emp-not-inc", "Private", "Private", "Private", "Private", "Private", "Self-emp-not-inc", "Private", "Private"), fnlwgt = c(77516, 83311, 215646, 234721, 338409, 284582, 160187, 209642, 45781, 159449), education = c("Bachelors", "Bachelors", "HS-grad", "11th", "Bachelors", "Masters", "9th", "HS-grad", "Masters", "Bachelors"), education_num = c(13, 13, 9, 7, 13, 14, 5, 9, 14, 13), marital_status = c("Never-married", "Married-civ-spouse", "Divorced", "Married-civ-spouse", "Married-civ-spouse", "Married-civ-spouse", "Married-spouse-absent", "Married-civ-spouse", "Never-married", "Married-civ-spouse"), occupation = c("Adm-clerical", "Exec-managerial", "Handlers-cleaners", "Handlers-cleaners", "Prof-specialty", "Exec-managerial", "Other-service", "Exec-managerial", "Prof-specialty", "Exec-managerial"), relationship = c("Not-in-family", "Husband", "Not-in-family", "Husband", "Wife", "Wife", "Not-in-family", "Husband", "Not-in-family", "Husband"), race = c("White", "White", "White", "Black", "Black", "White", "Black", "White", "White", "White"), sex = c("Male", "Male", "Male", "Male", "Female", "Female", "Female", "Male", "Female", "Male"), capital_gain = c(2174, 0, 0, 0, 0, 0, 0, 0, 14084, 5178), capital_loss = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0), hours_per_week = c(40, 13, 40, 40, 40, 40, 16, 45, 50, 40), native_country = c("United-States", "United-States", "United-States", "United-States", "Cuba", "United-States", "Jamaica", "United-States", "United-States", "United-States"), income = c("<=50K", "<=50K", "<=50K", "<=50K", "<=50K", "<=50K", "<=50K", ">50K", ">50K", ">50K") ) # 打印数据框 print(data) ``` 请注意,此代码创建了一个名为data的数据框,其中包含了您提供的所有列。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值