首页 > 解决方案 > 提到的代码错误,它说意外的符号

问题描述

无法运行以下代码:

loc <- sample(state_table$key, no_of_recs, replace=T, prob=c(2,2,1,1,1)) time_month <- sample(month_table$key, no_of_recs, replace=T) time_year <- sample( c(2012, 2013), no_of_recs, replace=T) prod <- sample(prod_table$key, no_of_recs, replace=T, prob=c(1, 3, 2)) 单位 <- sample(c(1,2) , no_of_recs, replace=T, prob=c(10, 3)) amount <- unit*prod_table[prod,]$price sales <- data.frame(month=time_month, year=time_year, loc=loc, prod=prod , 单位=单位, 数量=数量)

标签: datatable

解决方案


推荐阅读