包tsDyn NNET功能

时间:2018-03-10 13:41:06

标签: r nnet

我是R的新手,最近,我在tsDyn包中使用了NNET函数,当我同时加载两个包update// value coming from website var obj = { "regionId" : 3526, "regionName" : "So Cal", "categories" : [ "Other", "Seeds", "Tincture", "Cannabis", "Edibles", "Extracts", "Prerolled", "Vape Cartridges" ] } > db.drugs.insert(obj); > db.drugs.find({regionId: obj.regionId}).pretty(); { "_id" : ObjectId("5aa3ba064a7f0d521aa4dacb"), "regionId" : 3526, "regionName" : "So Cal", "categories" : [ "Other", "Seeds", "Tincture", "Cannabis", "Edibles", "Extracts", "Prerolled", "Vape Cartridges" ] } // assuming the category changes // push adds an element to categories > obj.categories.push("concain"); > db.drugs.update( { regionId: obj.regionId }, obj ); > db.drugs.find({regionId: obj.regionId}).pretty() { "_id" : ObjectId("5aa3ba064a7f0d521aa4dacb"), "regionId" : 3526, "regionName" : "So Cal", "categories" : [ "Other", "Seeds", "Tincture", "Cannabis", "Edibles", "Extracts", "Prerolled", "Vape Cartridges", "hello" ] } // remove hello from the categories > obj.categories.pop(); > db.drug.update( { regionId: obj.regionId }, obj ); > db.drugs.find({regionId: obj.regionId}).pretty(); { "_id" : ObjectId("5aa3ba064a7f0d521aa4dacb"), "regionId" : 3526, "regionName" : "So Cal", "categories" : [ "Other", "Seeds", "Tincture", "Cannabis", "Edibles", "Extracts", "Prerolled", "Vape Cartridges" ] } 时,我运行时出错了包tidyquant中的示例代码。我不知道如何解决这个问题。

tsDyn
  

错误:tsDyn必须是向量,而不是ts对象,是否需要library(tidyquant) library(tsDyn) mod.nnet <- nnetTs(log(lynx), m=2, size=3) mod.nnet

0 个答案:

没有答案