无法运行以下代码:
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))金额<-单位* prod_table [prod,] $价格销售<-data.frame(month = time_month,year = time_year,loc = loc, prod = prod,单位=单位,金额=金额)