title: How to confront error "wrong embedding dimension" in cajolst R function?
body: <p>When I try to use cajolst function from urca package I get a strange error.
  would you please guide me how can i confront the problem?</p>
  
  <pre><code>   result&lt;-urca::cajolst(data ,trend = FALSE, K = 2, season = NULL)
  </code></pre>
  
  <blockquote>
    <p>Error in embed(diff(x), K) : wrong embedding dimension.</p>
  </blockquote>
  
  <pre><code>  dates     A        G
  2016-11-30  0        0
  2016-12-01  -3.53   3.198
  2016-12-02  -2.832  8.703
  2016-12-04  -2.666  7.799
  2016-12-05  -0.54   7.701
  2016-12-06  -1.296  4.685
  2016-12-07  -1.785  -4.587
  2016-12-08  -6.834  -3.696
  2016-12-09  -9.624  -5.461
  2016-12-11  -11.374 -0.423
  2016-12-12  -6.037  -1.614
  2016-12-13  -5.934  -3.231
  2016-12-14  -7.279  1.072
  2016-12-15  -7.859  -4.823
  2016-12-16  -15.132 10.838
  2016-12-19  -15.345 11.5
  2016-12-20  -15.673 6.639
  2016-12-21  -15.391 11.162
  2016-12-22  -14.357 7.032
  2016-12-23  -14.99  12.355
  2016-12-26  -15.626 10.944
  2016-12-27  -12.297 10.215
  2016-12-28  -13.967 5.957
  2016-12-29  -12.946 3.446
  2016-12-30  -19.681 10.274
  2017-01-02  -18.24  8.781
  2017-01-03  -16.83  1.116
  2017-01-04  -18.189 -0.036
  2017-01-05  -15.897 -1.441
  2017-01-06  -20.196 -8.534
  2017-01-09  -14.57  -28.768
  2017-01-10  -13.27  -29.821
  2017-01-11  -8.85   -38.881
  2017-01-12  -6.375  -50.885
  2017-01-13  -8.056  -51.321
  2017-01-16  -5.217  -63.619
  2017-01-17  -4.75   -39.163
  2017-01-18  3.505   -46.309
  2017-01-19  10.939  -45.825
  2017-01-20  9.248   -42.973
  2017-01-23  9.532   -33.396
  2017-01-24  4.235   -31.38
  2017-01-25  -1.885  -19.21
  2017-01-26  -5.027  -15.74
  2017-01-27  0.015   -23.029
  2017-01-30  -0.685  -30.773
  2017-01-31  -2.692  -25.544
  2017-02-01  -2.654  -17.912
  2017-02-02  4.002   -43.309
  2017-02-03  4.813   -52.627
  2017-02-06  7.049   -49.965
  2017-02-07  10.003  -40.568
  2017-02-08  8.996   -39.828
  2017-02-09  7.047   -41.19
  2017-02-10  7.656   -50.853
  2017-02-13  4.986   -41.318
  2017-02-14  8.493   -51.946
  2017-02-15  12.547  -59.538
  2017-02-16  10.327  -54.496
  2017-02-17  7.09    -57.571
  2017-02-20  11.633  -54.91
  2017-02-21  12.664  -51.597
  2017-02-22  16.103  -57.819
  2017-02-23  14.25   -51.336
  2017-02-24  7.794   -54.898
  2017-02-27  15.27   -55.754
  2017-02-28  19.984  -58.37
  2017-03-01  23.899  -70.73
  2017-03-02  16.63   -56.29
  2017-03-03  16.443  -55.858
  2017-03-06  17.901  -59.377
  2017-03-07  19.067  -64.383
  2017-03-08  17.219  -57.829
  2017-03-09  15.694  -55.022
  2017-03-10  17.351  -60.431
  2017-03-13  18.945  -59.79
  2017-03-14  20.001  -64.848
  2017-03-15  23.852  -73.806
  2017-03-16  22.697  -64.191
  2017-03-17  26.892  -65.328
  2017-03-20  29.221  -72.764
  2017-03-21  25.165  -53.427
  2017-03-22  22.998  -51.676
  2017-03-23  20.072  -40.57
  2017-03-24  20.758  -43.654
  2017-03-27  20.062  -33.672
  2017-03-28  22.066  -47.184
  2017-03-29  22.363  -54.57
  2017-03-30  20.684  -48.199
  2017-03-31  17.056  -40.887
  2017-04-03  19.12   -39.618
  2017-04-04  16.359  -37.1
  2017-04-05  18.643  -32.734
  2017-04-06  14.708  -30.455
  2017-04-07  8.403   -33.553
  2017-04-10  6.072   -29.048
  2017-04-11  5.186   -20.696
  2017-04-12  4.248   -20.924
  2017-04-13  12.803  -31.075
  2017-04-14  12.566  -29.768
  2017-04-17  14.065  -28.906
  2017-04-18  14.5    4.121
  2017-04-19  13.865  8.835
  2017-04-20  16.126  6.191
  2017-04-21  17.591  3.77
  2017-04-24  22.3    -2.497
  2017-04-25  22.731  7.408
  2017-04-26  19.146  18.45
  2017-04-27  19.052  25.541
  2017-04-28  21.889  26.878
  2017-05-01  27.323  14.362
  2017-05-02  29.93   17.525
  2017-05-03  19.835  29.856
  2017-05-04  19.683  36.72
  2017-05-05  13.545  41.055
  2017-05-08  14.165  43.544
  2017-05-09  11.325  49.978
  2017-05-10  10.143  47.072
  2017-05-11  13.718  38.901
  2017-05-12  14.216  36.017
  2017-05-15  13.701  33.797
  2017-05-16  13.505  33.867
  2017-05-17  13.456  38.004
  2017-05-18  12.613  37.758
  2017-05-19  11.166  40.367
  2017-05-22  12.221  34.022
  2017-05-23  13.682  29.793
  2017-05-24  10.05   26.701
  2017-05-25  10.122  31.394
  2017-05-26  7.592   20.073
  2017-05-29  6.796   23.809
  2017-05-30  9.638   16.1
  2017-05-31  7.983   29.043
  2017-06-01  3.594   39.557
  2017-06-02  8.763   27.863
  2017-06-05  12.157  22.397
  2017-06-06  13.383  19.053
  2017-06-07  20.52   17.449
  2017-06-08  19.534  -1.615
  2017-06-09  16.011  -1.989
  2017-06-12  9.153   -9.294
  2017-06-13  4.295   -0.897
  2017-06-14  9.743   -9.818
  2017-06-15  10.386  -8.255
  2017-06-16  11.983  -12.522
  2017-06-19  9.513   -12.931
  2017-06-20  10.298  -21.024
  2017-06-21  11.087  -11.801
  2017-06-22  4.472   -9.048
  2017-06-23  9.416   -9.592
  2017-06-26  9.686   -12.006
  2017-06-27  6.424   -2.632
  2017-06-28  3.062   -1.016
  2017-06-29  5.593   -0.825
  2017-06-30  3.531   0.914
  2017-07-03  3.208   -2.596
  2017-07-04  -6.373  4.289
  2017-07-05  -5.149  5.917
  2017-07-06  -6.104  12.75
  2017-07-07  -9.565  1.615
  2017-07-10  -8.961  -0.053
  2017-07-11  -4.065  -8.541
  2017-07-12  -10.133 -11.286
  2017-07-13  -6.223  -15.181
  2017-07-14  -1.524  -14.396
  2017-07-17  -1.613  -14.61
  2017-07-18  5.781   -35.473
  2017-07-19  8.243   -44.186
  2017-07-20  7.665   -49.857
  2017-07-21  0.485   -41.286
  2017-07-24  -0.638  -39.127
  2017-07-25  0.767   -40.952
  2017-07-26  3.566   -44.388
  2017-07-27  6.834   -42.543
  2017-07-28  1.306   -37.657
  2017-07-31  5.839   -34.048
  2017-08-01  5.838   -28.939
  2017-08-02  7.298   -26.566
  2017-08-03  6.804   -32.876
  2017-08-04  8.989   -38.618
  2017-08-07  8.862   -36.676
  2017-08-08  8.234   -40.893
  2017-08-09  7.39    -35.16
  2017-08-10  8.593   -35.555
  2017-08-11  7.253   -35.175
  2017-08-14  5.593   -33.644
  2017-08-15  4.528   -37.82
  2017-08-16  6.752   -53.217
  2017-08-17  6.284   -49.252
  2017-08-18  4.765   -55.602
  2017-08-21  3.905   -54.32
  2017-08-22  1.76    -57.853
  2017-08-23  0.406   -58.925
  2017-08-24  -2.438  -58.098
  2017-08-25  -0.791  -56.682
  2017-08-28  2.173   -51.278
  2017-08-29  2.523   -54.353
  2017-08-30  4.482   -46.325
  2017-08-31  0.246   -52.567
  2017-09-01  -4.214  -53.636
  2017-09-04  -4.548  -52.735
  2017-09-05  -1.781  -50.421
  2017-09-06  -10.463 -51.122
  2017-09-07  -13.119 -52.433
  2017-09-08  -11.716 -43.493
  2017-09-11  -16.15  -43.142
  2017-09-12  -12.478 -29.335
  2017-09-13  -16.457 -31.697
  2017-09-14  -14.615 -15.13
  2017-09-15  -13.911 3.023
  </code></pre>