标记非单调递增的数据

时间:2019-02-13 13:58:07

标签: r vector cumulative-sum

亲爱的同事们,我有一个数据框,其中包含一个累加传感器的值,由于数据质量问题,该值有时会变为0。

我知道您可以按以下方式检查这些值是否满足单调递增的条件:

which(all(test[, 2] >= cummax(test[, 2])))

我试图获取标记,但它不起作用。

mono.flag(test, x.col=3, y.col=4, direction = 'inc', min=0, max(test$snsr_val))
Error: Positive column indexes in `[` must match number of columns:
* `.data` has 8 columns
* Position 1 equals 55237
Call `rlang::last_error()` to see a backtrace

然后我尝试使用软件包MonoInc,但出现以下错误:

> rlang::last_trace()
    x
 1. \-MonoInc::mono.flag(...)
 2.   +-base::cbind(data[, id.col], data[, x.col], data[, y.col])
 3.   +-data[, id.col]
 4.   \-tibble:::`[.tbl_df`(data, , id.col)
 5.     \-tibble:::check_names_df(j, x)
 6.       \-tibble:::check_names_df_numeric(j, x)
> 

回溯轨迹:

let json = {
  "name": "test"
  "actions": [
      {"foo":"moo"}
   ]
}

let test = jsonPath(schema, "$.name");
console.log(test); // returns undefined

let test = jsonPath(schema, "$.name").toJSONString();
console.log(test); // throws error toJSONString() undefined

let test = jsonPath(schema, "$.name").toString();
console.log(test); // throws error toString() undefined

let test = jsonPath(schema, "$.actions");
console.log(test); // returns undefined

let test = jsonPath(schema, "$.actions.*");
console.log(test); // returns undefined

let test = jsonPath(schema, "$..actions");
console.log(test); // returns undefined

其他人知道如何使用另一种方法来完成相同的任务吗?

BR / E

0 个答案:

没有答案
相关问题