tests/testthat/_snaps/qts-sample-class.md

Functions related to the QTS class work

Code
  vespa64$igp[1]
Output
  [[1]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99427   0.07973   0.06988   0.01334
   2     1   0.99483   0.07457   0.06763   0.01313
   3     2   0.99542   0.06931   0.06457   0.01269
   4     3   0.99602   0.06398   0.06091   0.01184
   5     4   0.99652   0.05949   0.05742   0.01070
   6     5   0.99694   0.05572   0.05403   0.00932
   7     6   0.99729   0.05275   0.05079   0.00772
   8     7   0.99757   0.05056   0.04761   0.00583
   9     8   0.99782   0.04883   0.04430   0.00366
  10     9   0.99805   0.04730   0.04071   0.00125
  # i 91 more rows

  attr(,"class")
  [1] "qts_sample" "list"

The function rnorm_qts() works

Code
  rnorm_qts(1, vespa64$igp[[1]])
Output
  [[1]]
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99840  -0.04080   0.02253   0.03190
   2     1   0.99819  -0.04462   0.02061   0.03480
   3     2   0.99823  -0.04494   0.01533   0.03572
   4     3   0.99740  -0.06064   0.00801   0.03824
   5     4   0.99697  -0.06308   0.00531   0.04529
   6     5   0.99672  -0.06448  -0.00204   0.04884
   7     6   0.99642  -0.06989  -0.00447   0.04733
   8     7   0.99639  -0.07440  -0.00602   0.04043
   9     8   0.99606  -0.07852  -0.00951   0.04009
  10     9   0.99573  -0.08389  -0.01392   0.03586
  # i 91 more rows

  attr(,"class")
  [1] "qts_sample" "list"

The function scale() works (center = TRUE, by_row = FALSE, keep_summary_stats = FALSE)

Code
  qts_list[[1]]
Output
  # A tibble: 101 x 5
      time         w         x         y         z
     <dbl> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99956  -0.01849   0.02258  -0.00497
   2     1   0.99960  -0.01996   0.01945  -0.00491
   3     2   0.99962  -0.02170   0.01592  -0.00514
   4     3   0.99962  -0.02412   0.01211  -0.00573
   5     4   0.99960  -0.02614   0.00892  -0.00643
   6     5   0.99956  -0.02801   0.00619  -0.00707
   7     6   0.99953  -0.02946   0.00407  -0.00758
   8     7   0.99951  -0.03028   0.00242  -0.00807
   9     8   0.99949  -0.03072   0.00100  -0.00865
  10     9   0.99948  -0.03085  -0.00056  -0.00936
  # i 91 more rows

The function scale() works (center = TRUE, by_row = TRUE, keep_summary_stats = FALSE)

Code
  qts_list[[1]]
Output
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99719   0.06241   0.04023   0.00987
   2     1   0.99746   0.05897   0.03873   0.00967
   3     2   0.99774   0.05548   0.03669   0.00932
   4     3   0.99802   0.05194   0.03426   0.00869
   5     4   0.99826   0.04896   0.03195   0.00787
   6     5   0.99845   0.04646   0.02970   0.00689
   7     6   0.99861   0.04450   0.02756   0.00578
   8     7   0.99874   0.04306   0.02546   0.00448
   9     8   0.99885   0.04192   0.02328   0.00300
  10     9   0.99894   0.04091   0.02091   0.00135
  # i 91 more rows

The mean() method works for qts_sample objects

Code
  mean(vespa64$igp)
Output
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99406   0.09402   0.05288   0.01472
   2     1   0.99445   0.08937   0.05352   0.01464
   3     2   0.99487   0.08469   0.05348   0.01450
   4     3   0.99527   0.08033   0.05280   0.01415
   5     4   0.99564   0.07651   0.05164   0.01351
   6     5   0.99597   0.07328   0.05011   0.01254
   7     6   0.99627   0.07059   0.04825   0.01122
   8     7   0.99655   0.06832   0.04607   0.00960
   9     8   0.99682   0.06631   0.04356   0.00773
  10     9   0.99707   0.06439   0.04079   0.00570
  # i 91 more rows

The median() method works for qts_sample objects

Code
  median(vespa64$igp)
Output
  # A tibble: 101 x 5
      time         w         x         y         z
     <int> <dec:.5!> <dec:.5!> <dec:.5!> <dec:.5!>
   1     0   0.99394   0.09157   0.05888   0.01513
   2     1   0.99439   0.08642   0.05913   0.01490
   3     2   0.99482   0.08181   0.05855   0.01465
   4     3   0.99525   0.07752   0.05723   0.01414
   5     4   0.99565   0.07364   0.05544   0.01338
   6     5   0.99603   0.07017   0.05331   0.01236
   7     6   0.99638   0.06712   0.05089   0.01105
   8     7   0.99671   0.06452   0.04823   0.00938
   9     8   0.99701   0.06221   0.04533   0.00742
  10     9   0.99729   0.05996   0.04228   0.00530
  # i 91 more rows


astamm/squad documentation built on Jan. 26, 2024, 5:30 p.m.