最后我想使用R + MongoDB。因此我在Linux上设置了MongoDB并执行了以下操作:
这是root用户权限
{
"_id" : "admin.root",
"user" : "root",
"db" : "admin",
"roles" : [
{
"role" : "dbOwner",
"db" : "admin"
},
{
"role" : "readWrite",
"db" : "admin"
},
{
"role" : "root",
"db" : "admin"
}
]}
运行命令以便在R和Mongo工作之间进行身份验证
> var schema = db.system.version.findOne({"_id" : "authSchema"})
> schema.currentVersion = 3
3
> db.system.version.save(schema)
获得以下结果
WriteResult({
"writeError" : {
"code" : 13,
"errmsg" : "not authorized on admin to execute command { update: \"system.version\", updates: [ { q: { _id: \"authSchema\" }, u: { _id: \"authSchema\", currentVersion: 3 }, multi: false, upsert: true } ], ordered: true }"
}})
Root和dbOwner不允许执行更新?我错过了什么? o.0
答案 0 :(得分:9)
我自己遇到了同样的问题。结果我需要" __系统"作用。
ggplot(data.df, aes(x = Axis1, y = Axis2, shape = Plant, color = Type)) +
geom_point(size = 5) +
geom_hline(aes(yintercept = 0)) +
geom_vline(aes(xintercept = 0))