tests/testthat/_snaps/driving.md

Default behavior works

{
  "type": "list",
  "attributes": {
    "names": {
      "type": "character",
      "attributes": {},
      "value": ["still_ratio"]
    },
    "row.names": {
      "type": "integer",
      "attributes": {},
      "value": [1]
    },
    "class": {
      "type": "character",
      "attributes": {},
      "value": ["tbl_df", "tbl", "data.frame"]
    }
  },
  "value": [
    {
      "type": "double",
      "attributes": {},
      "value": [0.27084829]
    }
  ]
}

Works with grouping variable

{
  "type": "list",
  "attributes": {
    "names": {
      "type": "character",
      "attributes": {},
      "value": ["id", "still_ratio"]
    },
    "row.names": {
      "type": "integer",
      "attributes": {},
      "value": [1, 2]
    },
    "class": {
      "type": "character",
      "attributes": {},
      "value": ["tbl_df", "tbl", "data.frame"]
    }
  },
  "value": [
    {
      "type": "integer",
      "attributes": {},
      "value": [1, 2]
    },
    {
      "type": "double",
      "attributes": {},
      "value": [0.27084829, 0.27871196]
    }
  ]
}

No error for negative duration case (but produces NAs)

{
  "type": "list",
  "attributes": {
    "class": {
      "type": "character",
      "attributes": {},
      "value": ["tbl_df", "tbl", "data.frame"]
    },
    "row.names": {
      "type": "integer",
      "attributes": {},
      "value": [1]
    },
    "names": {
      "type": "character",
      "attributes": {},
      "value": ["still_ratio"]
    }
  },
  "value": [
    {
      "type": "double",
      "attributes": {},
      "value": ["NA"]
    }
  ]
}


psychelzh/dataproc.iquizoo documentation built on Oct. 20, 2024, 6:26 p.m.