Error in plot.window(xlim, ylim, log, ...) : need finite 'ylim' values

New to R and it's very frustrating.

I'm just trying to make a simple time series graph.

I have data on bitcoin prices all the way back to 18/07/2010. There are no missing values. I'm not sure why i cannot make a simple chart.

I imported the data from a csv file. Then I converted the date and price variables to time series variables.

I then tried ggplot2 and then plot, but neither work at all.

Hi, welcome!

When asking programming related questions you have to be more specific, saying "I have tried X and Y but neither work", doesn't give us any information to help you out, we need to know what code are you running and what error messages you are getting so, Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ggplot2)
> setwd("desktop")
> read.csv(
+     file="Coinmetrics BTC2.csv",
+     stringsAsFactors = FALSE
+ )
         date AdrActCnt BlkCnt BlkSizeByte BlkSizeMeanByte CapMVRVCur
1  18/07/2010       860    172      136889        795.8663 146.038332
2  19/07/2010       929    174      139254        800.3103  62.565130
3  20/07/2010       936    181      197425       1090.7459  45.106630
4  21/07/2010       784    207      124991        603.8213  38.357560
5  22/07/2010       594    176      100750        572.4432  25.132348
6  23/07/2010       655    194      103001        530.9330  23.190988
7  24/07/2010       959    189      287193       1519.5397  17.071914
8  25/07/2010      2130    231      744810       3224.2857  14.294800
9  26/07/2010      1250    243      243769       1003.1646  12.571110
10 27/07/2010       775    166      126842        764.1084  12.410611
11 28/07/2010       664    159      782644       4922.2893  11.867736
12 29/07/2010       534    180      202582       1125.4556  13.541212
13 30/07/2010       582    182      111690        613.6813  12.032902
14 31/07/2010       479    203       96037        473.0887  12.052866
15 01/08/2010       622    239      103080        431.2971  10.448923
16 02/08/2010       632    242      105999        438.0124   9.976204
17 03/08/2010       988    227      189846        836.3260   9.604613
18 04/08/2010       715    243      115865        476.8107   8.828838
19 05/08/2010       825    218      203888        935.2661   9.195060
20 06/08/2010       640    147      128263        872.5374   9.025812
21 07/08/2010       500    155       80699        520.6387   8.428757
22 08/08/2010       581    199      105118        528.2312   8.477024
23 09/08/2010       782    190      297418       1565.3579   9.280854
24 10/08/2010       590    191       91479        478.9476   8.883873
   CapMrktCurUSD CapRealUSD DiffMean  FeeMeanNtv  FeeMeanUSD FeeMedNtv FeeMedUSD
1       295959.2   2026.585 181.5433 0.003185484 0.000273442         0         0
2       279285.2   4463.911 181.5433 0.000149701 0.000012096         0         0
3       259000.4   5741.959 181.5433 0.000000000 0.000000000         0         0
4       275266.5   7176.329 181.5433 0.000000000 0.000000000         0         0
5       203749.6   8107.065 181.5433 0.000000000 0.000000000         0         0
6       211735.7   9130.087 181.5433 0.000045455 0.000002754         0         0
7       191100.0  11193.823 181.5433 0.000000000 0.000000000         0         0
8       177670.5  12429.029 181.5433 0.001829038 0.000092441         0         0
9       197542.8  15714.030 181.5433 0.006607930 0.000370044         0         0
10      207278.7  16701.729 241.1930 0.002586873 0.000151648         0         0
11      208769.2  17591.320 244.2132 0.000367133 0.000021628         0         0
12      248340.7  18339.623 244.2132 0.001437803 0.000100502         0         0
13      230303.1  19139.450 244.2132 0.002127660 0.000137569         0         0
14      241277.0  20018.224 244.2132 0.003297872 0.000222757         0         0
15      218982.4  20957.414 244.2132 0.002338710 0.000142895         0         0
16      215766.0  21628.065 244.2132 0.001354839 0.000081290         0         0
17      216490.8  22540.298 244.2132 0.000000000 0.000000000         0         0
18      206374.3  23375.026 244.2132 0.000000000 0.000000000         0         0
19      221460.5  24084.725 261.5443 0.000000000 0.000000000         0         0
20      224351.0  24856.599 352.1612 0.010845070 0.000668830         0         0
21      215104.8  25520.344 352.1612 0.000000000 0.000000000         0         0
22      222623.0  26261.929 352.1612 0.000000000 0.000000000         0         0
23      258019.5  27801.268 352.1612 0.018382979 0.001294162         0         0
24      254792.1  28680.294 352.1612 0.000000000 0.000000000         0         0
   FeeTotNtv   FeeTotUSD    HashRate IssContNtv IssContPctAnn IssContUSD
1       0.79 0.067813600 0.001552225       8600      91.04356   738.2240
2       0.05 0.004040000 0.001570274       8700      91.87039   702.9600
3       0.00 0.000000000 0.001633446       9050      95.31676   676.3583
4       0.00 0.000000000 0.001868085      10350     108.68408   819.6461
5       0.00 0.000000000 0.001588324       8800      92.17436   514.5339
6       0.01 0.000605929 0.001750766       9700     101.31925   587.7508
7       0.00 0.000000000 0.001705643       9450      98.44171   515.4030
8       2.91 0.147073199 0.002084675      11550     119.92234   583.7441
9       1.50 0.084000000 0.002192970      12150     125.71757   680.4000
10      0.67 0.039276751 0.001990302       8300      85.67954   486.5627
11      1.05 0.061856654 0.001930245       7950      81.88244   468.3432
12      0.89 0.062211000 0.002185183       9000      92.46228   629.1000
13      0.30 0.019397214 0.002209463       9100      93.25079   588.3822
14      0.31 0.020939198 0.002464401      10150     103.71495   685.5899
15      0.29 0.017719000 0.002901437      11950     121.70061   730.1450
16      0.21 0.012600000 0.002937857      12100     122.81360   726.0000
17      0.00 0.000000000 0.002755758      11350     114.83874   681.1379
18      0.00 0.000000000 0.002949997      12150     122.52044   692.7417
19      0.00 0.000000000 0.002834314      10900     109.58546   664.9000
20      2.31 0.142460738 0.002573386       7350      73.74548   453.2842
21      0.00 0.000000000 0.002713434       7750      77.59354   457.2806
22      0.00 0.000000000 0.003483700       9950      99.34894   605.9550
23      4.32 0.304128000 0.003326145       9500      94.60990   668.8000
24      0.00 0.000000000 0.003343651       9550      94.86067   662.1849
   IssTotNtv IssTotUSD    NVTAdj NVTAdj90 PriceBTC   PriceUSD ROI1yr ROI30d
1       8600  738.2240 200.68042       NA        1 0.08584000     NA     NA
2       8700  702.9600  85.88916       NA        1 0.08080000     NA     NA
3       9050  676.3583 215.74428       NA        1 0.07473573     NA     NA
4      10350  819.6461 166.83666       NA        1 0.07919286     NA     NA
5       8800  514.5339 105.44031       NA        1 0.05846976     NA     NA
6       9700  587.7508 181.44480       NA        1 0.06059287     NA     NA
7       9450  515.4030  88.92011       NA        1 0.05454000     NA     NA
8      11550  583.7441 113.58540       NA        1 0.05054062     NA     NA
9      12150  680.4000  45.93813       NA        1 0.05600000     NA     NA
10      8300  486.5627 149.61419       NA        1 0.05862202     NA     NA
11      7950  468.3432  54.93384       NA        1 0.05891110     NA     NA
12      9000  629.1000 228.02789       NA        1 0.06990000     NA     NA
13      9100  588.3822 195.06262       NA        1 0.06465738     NA     NA
14     10150  685.5899 281.53379       NA        1 0.06754580     NA     NA
15     11950  730.1450  53.26050       NA        1 0.06110000     NA     NA
16     12100  726.0000  56.93535       NA        1 0.06000000     NA     NA
17     11350  681.1379 113.07033       NA        1 0.06001215     NA     NA
18     12150  692.7417 252.55320       NA        1 0.05701578     NA     NA
19     10900  664.9000 119.88978       NA        1 0.06100000     NA     NA
20      7350  453.2842 203.16477       NA        1 0.06167131     NA     NA
21      7750  457.2806 243.81354       NA        1 0.05900395     NA     NA
22      9950  605.9550 373.37344       NA        1 0.06090000     NA     NA
23      9500  668.8000  54.76560       NA        1 0.07040000     NA     NA
24      9550  662.1849 168.09329       NA        1 0.06933873     NA     NA
   SplyCur TxCnt TxTfrCnt TxTfrValAdjNtv TxTfrValAdjUSD TxTfrValMeanNtv
1  3447800   248      396       17180.55      1474.7784        48.78374
2  3456500   334      512       40243.73      3251.6934        86.95115
3  3465550   423      738       16063.23      1200.4972        42.52883
4  3475900   247      377       20834.15      1649.9160        71.82233
5  3484700   221      344       33049.03      1932.3689       112.71462
6  3494400   220      335       19258.75      1166.9429        63.15815
7  3503850   700     1112       39404.47      2149.1198        39.05706
8  3515400  1591     3102       30949.40      1564.2018        15.09425
9  3527550   227      338       76789.15      4300.1924       257.41893
10 3535850   259      408       23633.12      1385.4211        82.05113
11 3543800  2860      286       64510.33      3800.3744       230.21601
12 3552800   619      279       15580.55      1089.0804        70.59961
13 3561900   141      219       18260.29      1180.6625        88.85288
14 3572050    94      147       12687.82       857.0089       105.04476
15 3584000   124      202       67291.89      4111.5345      1337.76960
16 3596100   155      226       63161.11      3789.6666       281.07040
17 3607450   424      754       31904.48      1914.6565        56.18017
18 3619600   193      321       14332.03       817.1519        98.85075
19 3630500   301      504       30281.98      1847.2008        81.20631
20 3637850   213      351       17905.91      1104.2810        57.70157
21 3645600   113      162       14952.41       882.2512       143.87599
22 3655550   191      314        9790.60       596.2475        32.20013
23 3665050   235      364       66922.48      4711.3426       210.63637
24 3674600   151      215       21860.48      1515.7779       156.82419
   TxTfrValMeanUSD TxTfrValMedNtv TxTfrValMedUSD TxTfrValNtv TxTfrValUSD
1        4.1875960          1.850     0.15880400    19318.36   1658.2880
2        7.0256531          2.625     0.21210000    44518.99   3597.1344
3        3.1784235          1.375     0.10276163    31386.28   2345.6765
4        5.6878162         18.500     1.46506796    27077.02   2144.3067
5        6.5903969          1.010     0.05905446    38773.83   2267.0965
6        3.8269335          5.000     0.30296435    21157.98   1282.0227
7        2.1301720          0.050     0.00272700    43431.45   2368.7513
8        0.7628727          0.420     0.02122706    46822.36   2366.4310
9       14.4154604          5.000     0.28000000    87007.60   4872.4256
10       4.8100025          1.000     0.05862202    33476.86   1962.4810
11      13.5622783          1.885     0.11104742    65841.78   3878.8116
12       4.9349124         10.000     0.69900000    19697.29   1376.8406
13       5.7449944         11.600     0.75002563    19458.78   1258.1538
14       7.0953324          9.860     0.66600158    15441.58   1043.0139
15      81.7377228          6.815     0.41639650   270229.46  16511.0200
16      16.8642239          3.830     0.22980000    63521.91   3811.3146
17       3.3714930          7.775     0.46659447    42359.85   2542.1057
18       5.6360525          5.000     0.28507890    31731.09   1809.1729
19       4.9535849          0.510     0.03111000    40927.98   2496.6068
20       3.5585315          2.000     0.12334263    20253.25   1249.0446
21       8.4892509          4.875     0.28764423    23307.91   1375.2586
22       1.9609878          0.475     0.02892750    10110.84    615.7502
23      14.8288007         10.020     0.70540800    76671.64   5397.6835
24      10.8739897         50.000     3.46693644    33717.20   2337.9078
   VtyDayRet180d VtyDayRet30d VtyDayRet60d
1             NA           NA           NA
2             NA           NA           NA
3             NA           NA           NA
4             NA           NA           NA
5             NA           NA           NA
6             NA           NA           NA
7             NA           NA           NA
8             NA           NA           NA
9             NA           NA           NA
10            NA           NA           NA
11            NA           NA           NA
12            NA           NA           NA
13            NA           NA           NA
14            NA           NA           NA
15            NA           NA           NA
16            NA           NA           NA
17            NA           NA           NA
18            NA           NA           NA
19            NA           NA           NA
20            NA           NA           NA
21            NA           NA           NA
22            NA           NA           NA
23            NA           NA           NA
24            NA           NA           NA
 [ reached 'max' / getOption("max.print") -- omitted 3446 rows ]
> CoinMetrics<- read.csv(
+     file="Coinmetrics BTC2.csv",
+     stringsAsFactors = FALSE
+ )
> class(CoinMetrics)
[1] "data.frame"
> head(CoinMetrics)
        date AdrActCnt BlkCnt BlkSizeByte BlkSizeMeanByte CapMVRVCur
1 18/07/2010       860    172      136889        795.8663  146.03833
2 19/07/2010       929    174      139254        800.3103   62.56513
3 20/07/2010       936    181      197425       1090.7459   45.10663
4 21/07/2010       784    207      124991        603.8213   38.35756
5 22/07/2010       594    176      100750        572.4432   25.13235
6 23/07/2010       655    194      103001        530.9330   23.19099
  CapMrktCurUSD CapRealUSD DiffMean  FeeMeanNtv  FeeMeanUSD FeeMedNtv FeeMedUSD
1      295959.2   2026.585 181.5433 0.003185484 0.000273442         0         0
2      279285.2   4463.911 181.5433 0.000149701 0.000012096         0         0
3      259000.4   5741.959 181.5433 0.000000000 0.000000000         0         0
4      275266.5   7176.329 181.5433 0.000000000 0.000000000         0         0
5      203749.6   8107.065 181.5433 0.000000000 0.000000000         0         0
6      211735.7   9130.087 181.5433 0.000045455 0.000002754         0         0
  FeeTotNtv   FeeTotUSD    HashRate IssContNtv IssContPctAnn IssContUSD IssTotNtv
1      0.79 0.067813600 0.001552225       8600      91.04356   738.2240      8600
2      0.05 0.004040000 0.001570274       8700      91.87039   702.9600      8700
3      0.00 0.000000000 0.001633446       9050      95.31676   676.3583      9050
4      0.00 0.000000000 0.001868085      10350     108.68408   819.6461     10350
5      0.00 0.000000000 0.001588324       8800      92.17436   514.5339      8800
6      0.01 0.000605929 0.001750766       9700     101.31925   587.7508      9700
  IssTotUSD    NVTAdj NVTAdj90 PriceBTC   PriceUSD ROI1yr ROI30d SplyCur TxCnt
1  738.2240 200.68042       NA        1 0.08584000     NA     NA 3447800   248
2  702.9600  85.88916       NA        1 0.08080000     NA     NA 3456500   334
3  676.3583 215.74428       NA        1 0.07473573     NA     NA 3465550   423
4  819.6461 166.83666       NA        1 0.07919286     NA     NA 3475900   247
5  514.5339 105.44031       NA        1 0.05846976     NA     NA 3484700   221
6  587.7508 181.44480       NA        1 0.06059287     NA     NA 3494400   220
  TxTfrCnt TxTfrValAdjNtv TxTfrValAdjUSD TxTfrValMeanNtv TxTfrValMeanUSD
1      396       17180.55       1474.778        48.78374        4.187596
2      512       40243.73       3251.693        86.95115        7.025653
3      738       16063.23       1200.497        42.52883        3.178423
4      377       20834.15       1649.916        71.82233        5.687816
5      344       33049.03       1932.369       112.71462        6.590397
6      335       19258.75       1166.943        63.15815        3.826934
  TxTfrValMedNtv TxTfrValMedUSD TxTfrValNtv TxTfrValUSD VtyDayRet180d
1          1.850     0.15880400    19318.36    1658.288            NA
2          2.625     0.21210000    44518.99    3597.134            NA
3          1.375     0.10276163    31386.28    2345.677            NA
4         18.500     1.46506796    27077.02    2144.307            NA
5          1.010     0.05905446    38773.83    2267.097            NA
6          5.000     0.30296435    21157.98    1282.023            NA
  VtyDayRet30d VtyDayRet60d
1           NA           NA
2           NA           NA
3           NA           NA
4           NA           NA
5           NA           NA
6           NA           NA
> str(CoinMetrics)
'data.frame':	3470 obs. of  41 variables:
 $ date           : chr  "18/07/2010" "19/07/2010" "20/07/2010" "21/07/2010" ...
 $ AdrActCnt      : num  860 929 936 784 594 655 959 2130 1250 775 ...
 $ BlkCnt         : num  172 174 181 207 176 194 189 231 243 166 ...
 $ BlkSizeByte    : num  136889 139254 197425 124991 100750 ...
 $ BlkSizeMeanByte: num  796 800 1091 604 572 ...
 $ CapMVRVCur     : num  146 62.6 45.1 38.4 25.1 ...
 $ CapMrktCurUSD  : num  295959 279285 259000 275266 203750 ...
 $ CapRealUSD     : num  2027 4464 5742 7176 8107 ...
 $ DiffMean       : num  182 182 182 182 182 ...
 $ FeeMeanNtv     : num  0.00319 0.00015 0 0 0 ...
 $ FeeMeanUSD     : num  2.73e-04 1.21e-05 0.00 0.00 0.00 ...
 $ FeeMedNtv      : num  0 0 0 0 0 0 0 0 0 0 ...
 $ FeeMedUSD      : num  0 0 0 0 0 0 0 0 0 0 ...
 $ FeeTotNtv      : num  0.79 0.05 0 0 0 0.01 0 2.91 1.5 0.67 ...
 $ FeeTotUSD      : num  0.06781 0.00404 0 0 0 ...
 $ HashRate       : num  0.00155 0.00157 0.00163 0.00187 0.00159 ...
 $ IssContNtv     : num  8600 8700 9050 10350 8800 ...
 $ IssContPctAnn  : num  91 91.9 95.3 108.7 92.2 ...
 $ IssContUSD     : num  738 703 676 820 515 ...
 $ IssTotNtv      : num  8600 8700 9050 10350 8800 ...
 $ IssTotUSD      : num  738 703 676 820 515 ...
 $ NVTAdj         : num  200.7 85.9 215.7 166.8 105.4 ...
 $ NVTAdj90       : num  NA NA NA NA NA NA NA NA NA NA ...
 $ PriceBTC       : num  1 1 1 1 1 1 1 1 1 1 ...
 $ PriceUSD       : num  0.0858 0.0808 0.0747 0.0792 0.0585 ...
 $ ROI1yr         : num  NA NA NA NA NA NA NA NA NA NA ...
 $ ROI30d         : num  NA NA NA NA NA NA NA NA NA NA ...
 $ SplyCur        : num  3447800 3456500 3465550 3475900 3484700 ...
 $ TxCnt          : num  248 334 423 247 221 ...
 $ TxTfrCnt       : num  396 512 738 377 344 ...
 $ TxTfrValAdjNtv : num  17181 40244 16063 20834 33049 ...
 $ TxTfrValAdjUSD : num  1475 3252 1200 1650 1932 ...
 $ TxTfrValMeanNtv: num  48.8 87 42.5 71.8 112.7 ...
 $ TxTfrValMeanUSD: num  4.19 7.03 3.18 5.69 6.59 ...
 $ TxTfrValMedNtv : num  1.85 2.62 1.38 18.5 1.01 ...
 $ TxTfrValMedUSD : num  0.1588 0.2121 0.1028 1.4651 0.0591 ...
 $ TxTfrValNtv    : num  19318 44519 31386 27077 38774 ...
 $ TxTfrValUSD    : num  1658 3597 2346 2144 2267 ...
 $ VtyDayRet180d  : num  NA NA NA NA NA NA NA NA NA NA ...
 $ VtyDayRet30d   : num  NA NA NA NA NA NA NA NA NA NA ...
 $ VtyDayRet60d   : num  NA NA NA NA NA NA NA NA NA NA ...
> ggplot2(PriceUSD)
Error in ggplot2(PriceUSD) : could not find function "ggplot2"
> qplot(x=date, y=PriceUSD, 
+       data=CoinMetrics,
+       main="Price of Bitcoin in USD")
> 
> qplot(x=date, y=PriceUSD,+ data=CoinMetrics,+ main="Price of Bitcoin in USD")

When I run the last command, I get a weird graph that is not time series.

Another error I get:

> CoinMetrics$date
   [1] "18/07/2010" "19/07/2010" "20/07/2010" "21/07/2010" "22/07/2010"
   [6] "23/07/2010" "24/07/2010" "25/07/2010" "26/07/2010" "27/07/2010"
  [11] "28/07/2010" "29/07/2010" "30/07/2010" "31/07/2010" "01/08/2010"
  [16] "02/08/2010" "03/08/2010" "04/08/2010" "05/08/2010" "06/08/2010"
  [21] "07/08/2010" "08/08/2010" "09/08/2010" "10/08/2010" "11/08/2010"
  [26] "12/08/2010" "13/08/2010" "14/08/2010" "15/08/2010" "16/08/2010"
  [31] "17/08/2010" "18/08/2010" "19/08/2010" "20/08/2010" "21/08/2010"
  [36] "22/08/2010" "23/08/2010" "24/08/2010" "25/08/2010" "26/08/2010"
  [41] "27/08/2010" "28/08/2010" "29/08/2010" "30/08/2010" "31/08/2010"
  [46] "01/09/2010" "02/09/2010" "03/09/2010" "04/09/2010" "05/09/2010"
  [51] "06/09/2010" "07/09/2010" "08/09/2010" "09/09/2010" "10/09/2010"
  [56] "11/09/2010" "12/09/2010" "13/09/2010" "14/09/2010" "15/09/2010"
  [61] "16/09/2010" "17/09/2010" "18/09/2010" "19/09/2010" "20/09/2010"
  [66] "21/09/2010" "22/09/2010" "23/09/2010" "24/09/2010" "25/09/2010"
  [71] "26/09/2010" "27/09/2010" "28/09/2010" "29/09/2010" "30/09/2010"
  [76] "01/10/2010" "02/10/2010" "03/10/2010" "04/10/2010" "05/10/2010"
  [81] "06/10/2010" "07/10/2010" "08/10/2010" "09/10/2010" "10/10/2010"
  [86] "11/10/2010" "12/10/2010" "13/10/2010" "14/10/2010" "15/10/2010"
  [91] "16/10/2010" "17/10/2010" "18/10/2010" "19/10/2010" "20/10/2010"
  [96] "21/10/2010" "22/10/2010" "23/10/2010" "24/10/2010" "25/10/2010"
 [101] "26/10/2010" "27/10/2010" "28/10/2010" "29/10/2010" "30/10/2010"
 [106] "31/10/2010" "01/11/2010" "02/11/2010" "03/11/2010" "04/11/2010"
 [111] "05/11/2010" "06/11/2010" "07/11/2010" "08/11/2010" "09/11/2010"
 [116] "10/11/2010" "11/11/2010" "12/11/2010" "13/11/2010" "14/11/2010"
 [121] "15/11/2010" "16/11/2010" "17/11/2010" "18/11/2010" "19/11/2010"
 [126] "20/11/2010" "21/11/2010" "22/11/2010" "23/11/2010" "24/11/2010"
 [131] "25/11/2010" "26/11/2010" "27/11/2010" "28/11/2010" "29/11/2010"
 [136] "30/11/2010" "01/12/2010" "02/12/2010" "03/12/2010" "04/12/2010"
 [141] "05/12/2010" "06/12/2010" "07/12/2010" "08/12/2010" "09/12/2010"
 [146] "10/12/2010" "11/12/2010" "12/12/2010" "13/12/2010" "14/12/2010"
 [151] "15/12/2010" "16/12/2010" "17/12/2010" "18/12/2010" "19/12/2010"
 [156] "20/12/2010" "21/12/2010" "22/12/2010" "23/12/2010" "24/12/2010"
 [161] "25/12/2010" "26/12/2010" "27/12/2010" "28/12/2010" "29/12/2010"
 [166] "30/12/2010" "31/12/2010" "01/01/2011" "02/01/2011" "03/01/2011"
 [171] "04/01/2011" "05/01/2011" "06/01/2011" "07/01/2011" "08/01/2011"
 [176] "09/01/2011" "10/01/2011" "11/01/2011" "12/01/2011" "13/01/2011"
 [181] "14/01/2011" "15/01/2011" "16/01/2011" "17/01/2011" "18/01/2011"
 [186] "19/01/2011" "20/01/2011" "21/01/2011" "22/01/2011" "23/01/2011"
 [191] "24/01/2011" "25/01/2011" "26/01/2011" "27/01/2011" "28/01/2011"
 [196] "29/01/2011" "30/01/2011" "31/01/2011" "01/02/2011" "02/02/2011"
 [201] "03/02/2011" "04/02/2011" "05/02/2011" "06/02/2011" "07/02/2011"
 [206] "08/02/2011" "09/02/2011" "10/02/2011" "11/02/2011" "12/02/2011"
 [211] "13/02/2011" "14/02/2011" "15/02/2011" "16/02/2011" "17/02/2011"
 [216] "18/02/2011" "19/02/2011" "20/02/2011" "21/02/2011" "22/02/2011"
 [221] "23/02/2011" "24/02/2011" "25/02/2011" "26/02/2011" "27/02/2011"
 [226] "28/02/2011" "01/03/2011" "02/03/2011" "03/03/2011" "04/03/2011"
 [231] "05/03/2011" "06/03/2011" "07/03/2011" "08/03/2011" "09/03/2011"
 [236] "10/03/2011" "11/03/2011" "12/03/2011" "13/03/2011" "14/03/2011"
 [241] "15/03/2011" "16/03/2011" "17/03/2011" "18/03/2011" "19/03/2011"
 [246] "20/03/2011" "21/03/2011" "22/03/2011" "23/03/2011" "24/03/2011"
 [251] "25/03/2011" "26/03/2011" "27/03/2011" "28/03/2011" "29/03/2011"
 [256] "30/03/2011" "31/03/2011" "01/04/2011" "02/04/2011" "03/04/2011"
 [261] "04/04/2011" "05/04/2011" "06/04/2011" "07/04/2011" "08/04/2011"
 [266] "09/04/2011" "10/04/2011" "11/04/2011" "12/04/2011" "13/04/2011"
 [271] "14/04/2011" "15/04/2011" "16/04/2011" "17/04/2011" "18/04/2011"
 [276] "19/04/2011" "20/04/2011" "21/04/2011" "22/04/2011" "23/04/2011"
 [281] "24/04/2011" "25/04/2011" "26/04/2011" "27/04/2011" "28/04/2011"
 [286] "29/04/2011" "30/04/2011" "01/05/2011" "02/05/2011" "03/05/2011"
 [291] "04/05/2011" "05/05/2011" "06/05/2011" "07/05/2011" "08/05/2011"
 [296] "09/05/2011" "10/05/2011" "11/05/2011" "12/05/2011" "13/05/2011"
 [301] "14/05/2011" "15/05/2011" "16/05/2011" "17/05/2011" "18/05/2011"
 [306] "19/05/2011" "20/05/2011" "21/05/2011" "22/05/2011" "23/05/2011"
 [311] "24/05/2011" "25/05/2011" "26/05/2011" "27/05/2011" "28/05/2011"
 [316] "29/05/2011" "30/05/2011" "31/05/2011" "01/06/2011" "02/06/2011"
 [321] "03/06/2011" "04/06/2011" "05/06/2011" "06/06/2011" "07/06/2011"
 [326] "08/06/2011" "09/06/2011" "10/06/2011" "11/06/2011" "12/06/2011"
 [331] "13/06/2011" "14/06/2011" "15/06/2011" "16/06/2011" "17/06/2011"
 [336] "18/06/2011" "19/06/2011" "20/06/2011" "21/06/2011" "22/06/2011"
 [341] "23/06/2011" "24/06/2011" "25/06/2011" "26/06/2011" "27/06/2011"
 [346] "28/06/2011" "29/06/2011" "30/06/2011" "01/07/2011" "02/07/2011"
 [351] "03/07/2011" "04/07/2011" "05/07/2011" "06/07/2011" "07/07/2011"
 [356] "08/07/2011" "09/07/2011" "10/07/2011" "11/07/2011" "12/07/2011"
 [361] "13/07/2011" "14/07/2011" "15/07/2011" "16/07/2011" "17/07/2011"
 [366] "18/07/2011" "19/07/2011" "20/07/2011" "21/07/2011" "22/07/2011"
 [371] "23/07/2011" "24/07/2011" "25/07/2011" "26/07/2011" "27/07/2011"
 [376] "28/07/2011" "29/07/2011" "30/07/2011" "31/07/2011" "01/08/2011"
 [381] "02/08/2011" "03/08/2011" "04/08/2011" "05/08/2011" "06/08/2011"
 [386] "07/08/2011" "08/08/2011" "09/08/2011" "10/08/2011" "11/08/2011"
 [391] "12/08/2011" "13/08/2011" "14/08/2011" "15/08/2011" "16/08/2011"
 [396] "17/08/2011" "18/08/2011" "19/08/2011" "20/08/2011" "21/08/2011"
 [401] "22/08/2011" "23/08/2011" "24/08/2011" "25/08/2011" "26/08/2011"
 [406] "27/08/2011" "28/08/2011" "29/08/2011" "30/08/2011" "31/08/2011"
 [411] "01/09/2011" "02/09/2011" "03/09/2011" "04/09/2011" "05/09/2011"
 [416] "06/09/2011" "07/09/2011" "08/09/2011" "09/09/2011" "10/09/2011"
 [421] "11/09/2011" "12/09/2011" "13/09/2011" "14/09/2011" "15/09/2011"
 [426] "16/09/2011" "17/09/2011" "18/09/2011" "19/09/2011" "20/09/2011"
 [431] "21/09/2011" "22/09/2011" "23/09/2011" "24/09/2011" "25/09/2011"
 [436] "26/09/2011" "27/09/2011" "28/09/2011" "29/09/2011" "30/09/2011"
 [441] "01/10/2011" "02/10/2011" "03/10/2011" "04/10/2011" "05/10/2011"
 [446] "06/10/2011" "07/10/2011" "08/10/2011" "09/10/2011" "10/10/2011"
 [451] "11/10/2011" "12/10/2011" "13/10/2011" "14/10/2011" "15/10/2011"
 [456] "16/10/2011" "17/10/2011" "18/10/2011" "19/10/2011" "20/10/2011"
 [461] "21/10/2011" "22/10/2011" "23/10/2011" "24/10/2011" "25/10/2011"
 [466] "26/10/2011" "27/10/2011" "28/10/2011" "29/10/2011" "30/10/2011"
 [471] "31/10/2011" "01/11/2011" "02/11/2011" "03/11/2011" "04/11/2011"
 [476] "05/11/2011" "06/11/2011" "07/11/2011" "08/11/2011" "09/11/2011"
 [481] "10/11/2011" "11/11/2011" "12/11/2011" "13/11/2011" "14/11/2011"
 [486] "15/11/2011" "16/11/2011" "17/11/2011" "18/11/2011" "19/11/2011"
 [491] "20/11/2011" "21/11/2011" "22/11/2011" "23/11/2011" "24/11/2011"
 [496] "25/11/2011" "26/11/2011" "27/11/2011" "28/11/2011" "29/11/2011"
 [501] "30/11/2011" "01/12/2011" "02/12/2011" "03/12/2011" "04/12/2011"
 [506] "05/12/2011" "06/12/2011" "07/12/2011" "08/12/2011" "09/12/2011"
 [511] "10/12/2011" "11/12/2011" "12/12/2011" "13/12/2011" "14/12/2011"
 [516] "15/12/2011" "16/12/2011" "17/12/2011" "18/12/2011" "19/12/2011"
 [521] "20/12/2011" "21/12/2011" "22/12/2011" "23/12/2011" "24/12/2011"
 [526] "25/12/2011" "26/12/2011" "27/12/2011" "28/12/2011" "29/12/2011"
 [531] "30/12/2011" "31/12/2011" "01/01/2012" "02/01/2012" "03/01/2012"
 [536] "04/01/2012" "05/01/2012" "06/01/2012" "07/01/2012" "08/01/2012"
 [541] "09/01/2012" "10/01/2012" "11/01/2012" "12/01/2012" "13/01/2012"
 [546] "14/01/2012" "15/01/2012" "16/01/2012" "17/01/2012" "18/01/2012"
 [551] "19/01/2012" "20/01/2012" "21/01/2012" "22/01/2012" "23/01/2012"
 [556] "24/01/2012" "25/01/2012" "26/01/2012" "27/01/2012" "28/01/2012"
 [561] "29/01/2012" "30/01/2012" "31/01/2012" "01/02/2012" "02/02/2012"
 [566] "03/02/2012" "04/02/2012" "05/02/2012" "06/02/2012" "07/02/2012"
 [571] "08/02/2012" "09/02/2012" "10/02/2012" "11/02/2012" "12/02/2012"
 [576] "13/02/2012" "14/02/2012" "15/02/2012" "16/02/2012" "17/02/2012"
 [581] "18/02/2012" "19/02/2012" "20/02/2012" "21/02/2012" "22/02/2012"
 [586] "23/02/2012" "24/02/2012" "25/02/2012" "26/02/2012" "27/02/2012"
 [591] "28/02/2012" "29/02/2012" "01/03/2012" "02/03/2012" "03/03/2012"
 [596] "04/03/2012" "05/03/2012" "06/03/2012" "07/03/2012" "08/03/2012"
 [601] "09/03/2012" "10/03/2012" "11/03/2012" "12/03/2012" "13/03/2012"
 [606] "14/03/2012" "15/03/2012" "16/03/2012" "17/03/2012" "18/03/2012"
 [611] "19/03/2012" "20/03/2012" "21/03/2012" "22/03/2012" "23/03/2012"
 [616] "24/03/2012" "25/03/2012" "26/03/2012" "27/03/2012" "28/03/2012"
 [621] "29/03/2012" "30/03/2012" "31/03/2012" "01/04/2012" "02/04/2012"
 [626] "03/04/2012" "04/04/2012" "05/04/2012" "06/04/2012" "07/04/2012"
 [631] "08/04/2012" "09/04/2012" "10/04/2012" "11/04/2012" "12/04/2012"
 [636] "13/04/2012" "14/04/2012" "15/04/2012" "16/04/2012" "17/04/2012"
 [641] "18/04/2012" "19/04/2012" "20/04/2012" "21/04/2012" "22/04/2012"
 [646] "23/04/2012" "24/04/2012" "25/04/2012" "26/04/2012" "27/04/2012"
 [651] "28/04/2012" "29/04/2012" "30/04/2012" "01/05/2012" "02/05/2012"
 [656] "03/05/2012" "04/05/2012" "05/05/2012" "06/05/2012" "07/05/2012"
 [661] "08/05/2012" "09/05/2012" "10/05/2012" "11/05/2012" "12/05/2012"
 [666] "13/05/2012" "14/05/2012" "15/05/2012" "16/05/2012" "17/05/2012"
 [671] "18/05/2012" "19/05/2012" "20/05/2012" "21/05/2012" "22/05/2012"
 [676] "23/05/2012" "24/05/2012" "25/05/2012" "26/05/2012" "27/05/2012"
 [681] "28/05/2012" "29/05/2012" "30/05/2012" "31/05/2012" "01/06/2012"
 [686] "02/06/2012" "03/06/2012" "04/06/2012" "05/06/2012" "06/06/2012"
 [691] "07/06/2012" "08/06/2012" "09/06/2012" "10/06/2012" "11/06/2012"
 [696] "12/06/2012" "13/06/2012" "14/06/2012" "15/06/2012" "16/06/2012"
 [701] "17/06/2012" "18/06/2012" "19/06/2012" "20/06/2012" "21/06/2012"
 [706] "22/06/2012" "23/06/2012" "24/06/2012" "25/06/2012" "26/06/2012"
 [711] "27/06/2012" "28/06/2012" "29/06/2012" "30/06/2012" "01/07/2012"
 [716] "02/07/2012" "03/07/2012" "04/07/2012" "05/07/2012" "06/07/2012"
 [721] "07/07/2012" "08/07/2012" "09/07/2012" "10/07/2012" "11/07/2012"
 [726] "12/07/2012" "13/07/2012" "14/07/2012" "15/07/2012" "16/07/2012"
 [731] "17/07/2012" "18/07/2012" "19/07/2012" "20/07/2012" "21/07/2012"
 [736] "22/07/2012" "23/07/2012" "24/07/2012" "25/07/2012" "26/07/2012"
 [741] "27/07/2012" "28/07/2012" "29/07/2012" "30/07/2012" "31/07/2012"
 [746] "01/08/2012" "02/08/2012" "03/08/2012" "04/08/2012" "05/08/2012"
 [751] "06/08/2012" "07/08/2012" "08/08/2012" "09/08/2012" "10/08/2012"
 [756] "11/08/2012" "12/08/2012" "13/08/2012" "14/08/2012" "15/08/2012"
 [761] "16/08/2012" "17/08/2012" "18/08/2012" "19/08/2012" "20/08/2012"
 [766] "21/08/2012" "22/08/2012" "23/08/2012" "24/08/2012" "25/08/2012"
 [771] "26/08/2012" "27/08/2012" "28/08/2012" "29/08/2012" "30/08/2012"
 [776] "31/08/2012" "01/09/2012" "02/09/2012" "03/09/2012" "04/09/2012"
 [781] "05/09/2012" "06/09/2012" "07/09/2012" "08/09/2012" "09/09/2012"
 [786] "10/09/2012" "11/09/2012" "12/09/2012" "13/09/2012" "14/09/2012"
 [791] "15/09/2012" "16/09/2012" "17/09/2012" "18/09/2012" "19/09/2012"
 [796] "20/09/2012" "21/09/2012" "22/09/2012" "23/09/2012" "24/09/2012"
 [801] "25/09/2012" "26/09/2012" "27/09/2012" "28/09/2012" "29/09/2012"
 [806] "30/09/2012" "01/10/2012" "02/10/2012" "03/10/2012" "04/10/2012"
 [811] "05/10/2012" "06/10/2012" "07/10/2012" "08/10/2012" "09/10/2012"
 [816] "10/10/2012" "11/10/2012" "12/10/2012" "13/10/2012" "14/10/2012"
 [821] "15/10/2012" "16/10/2012" "17/10/2012" "18/10/2012" "19/10/2012"
 [826] "20/10/2012" "21/10/2012" "22/10/2012" "23/10/2012" "24/10/2012"
 [831] "25/10/2012" "26/10/2012" "27/10/2012" "28/10/2012" "29/10/2012"
 [836] "30/10/2012" "31/10/2012" "01/11/2012" "02/11/2012" "03/11/2012"
 [841] "04/11/2012" "05/11/2012" "06/11/2012" "07/11/2012" "08/11/2012"
 [846] "09/11/2012" "10/11/2012" "11/11/2012" "12/11/2012" "13/11/2012"
 [851] "14/11/2012" "15/11/2012" "16/11/2012" "17/11/2012" "18/11/2012"
 [856] "19/11/2012" "20/11/2012" "21/11/2012" "22/11/2012" "23/11/2012"
 [861] "24/11/2012" "25/11/2012" "26/11/2012" "27/11/2012" "28/11/2012"
 [866] "29/11/2012" "30/11/2012" "01/12/2012" "02/12/2012" "03/12/2012"
 [871] "04/12/2012" "05/12/2012" "06/12/2012" "07/12/2012" "08/12/2012"
 [876] "09/12/2012" "10/12/2012" "11/12/2012" "12/12/2012" "13/12/2012"
 [881] "14/12/2012" "15/12/2012" "16/12/2012" "17/12/2012" "18/12/2012"
 [886] "19/12/2012" "20/12/2012" "21/12/2012" "22/12/2012" "23/12/2012"
 [891] "24/12/2012" "25/12/2012" "26/12/2012" "27/12/2012" "28/12/2012"
 [896] "29/12/2012" "30/12/2012" "31/12/2012" "01/01/2013" "02/01/2013"
 [901] "03/01/2013" "04/01/2013" "05/01/2013" "06/01/2013" "07/01/2013"
 [906] "08/01/2013" "09/01/2013" "10/01/2013" "11/01/2013" "12/01/2013"
 [911] "13/01/2013" "14/01/2013" "15/01/2013" "16/01/2013" "17/01/2013"
 [916] "18/01/2013" "19/01/2013" "20/01/2013" "21/01/2013" "22/01/2013"
 [921] "23/01/2013" "24/01/2013" "25/01/2013" "26/01/2013" "27/01/2013"
 [926] "28/01/2013" "29/01/2013" "30/01/2013" "31/01/2013" "01/02/2013"
 [931] "02/02/2013" "03/02/2013" "04/02/2013" "05/02/2013" "06/02/2013"
 [936] "07/02/2013" "08/02/2013" "09/02/2013" "10/02/2013" "11/02/2013"
 [941] "12/02/2013" "13/02/2013" "14/02/2013" "15/02/2013" "16/02/2013"
 [946] "17/02/2013" "18/02/2013" "19/02/2013" "20/02/2013" "21/02/2013"
 [951] "22/02/2013" "23/02/2013" "24/02/2013" "25/02/2013" "26/02/2013"
 [956] "27/02/2013" "28/02/2013" "01/03/2013" "02/03/2013" "03/03/2013"
 [961] "04/03/2013" "05/03/2013" "06/03/2013" "07/03/2013" "08/03/2013"
 [966] "09/03/2013" "10/03/2013" "11/03/2013" "12/03/2013" "13/03/2013"
 [971] "14/03/2013" "15/03/2013" "16/03/2013" "17/03/2013" "18/03/2013"
 [976] "19/03/2013" "20/03/2013" "21/03/2013" "22/03/2013" "23/03/2013"
 [981] "24/03/2013" "25/03/2013" "26/03/2013" "27/03/2013" "28/03/2013"
 [986] "29/03/2013" "30/03/2013" "31/03/2013" "01/04/2013" "02/04/2013"
 [991] "03/04/2013" "04/04/2013" "05/04/2013" "06/04/2013" "07/04/2013"
 [996] "08/04/2013" "09/04/2013" "10/04/2013" "11/04/2013" "12/04/2013"
 [ reached getOption("max.print") -- omitted 2470 entries ]
> library(zoo)
> zoodata <- zoo(CoinMetrics, order.by=CoinMetrics$date)
> plot(zoodata$PriceUSD)
Error in plot.window(...) : invalid 'ylim' value
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf

wtf is going on, why is this so difficult compared to Stata

First of all, please cut the trash talk, we like to keep things polite here, now to the business. You can't compare Stata with R, the former is a statistical software the later is a programming language, more comparable to Python, so you have to change your mindset when working with R and realize you are programming now so you need to pay attention to syntax, it actually is not that hard it just takes some time to get used to it.

I have made a reproducible example with a small subset of your data (this is what I was asking you to do when I asked for a reprex, you should read the guide I gave you if you want to learn how to properly ask for help here).

library(tidyverse)
library(lubridate)

# Sample data on a copy/paste friendly format
CoinMetrics <- data.frame(
  stringsAsFactors = FALSE,
              date = c("18/07/2010","19/07/2010",
                       "20/07/2010","21/07/2010","22/07/2010","23/07/2010",
                       "24/07/2010","25/07/2010","26/07/2010","27/07/2010",
                       "28/07/2010","29/07/2010","30/07/2010","31/07/2010",
                       "01/08/2010","02/08/2010","03/08/2010","04/08/2010",
                       "05/08/2010","06/08/2010","07/08/2010","08/08/2010",
                       "09/08/2010","10/08/2010"),
         AdrActCnt = c(860,929,936,784,594,655,
                       959,2130,1250,775,664,534,582,479,622,632,988,
                       715,825,640,500,581,782,590),
            BlkCnt = c(172,174,181,207,176,194,
                       189,231,243,166,159,180,182,203,239,242,227,243,
                       218,147,155,199,190,191),
       BlkSizeByte = c(136889,139254,197425,124991,
                       100750,103001,287193,744810,243769,126842,782644,
                       202582,111690,96037,103080,105999,189846,115865,
                       203888,128263,80699,105118,297418,91479),
   BlkSizeMeanByte = c(795.8663,800.3103,1090.7459,
                       603.8213,572.4432,530.933,1519.5397,3224.2857,
                       1003.1646,764.1084,4922.2893,1125.4556,613.6813,473.0887,
                       431.2971,438.0124,836.326,476.8107,935.2661,872.5374,
                       520.6387,528.2312,1565.3579,478.9476),
        CapMVRVCur = c(146.038332,62.56513,45.10663,
                       38.35756,25.132348,23.190988,17.071914,14.2948,
                       12.57111,12.410611,11.867736,13.541212,12.032902,
                       12.052866,10.448923,9.976204,9.604613,8.828838,9.19506,
                       9.025812,8.428757,8.477024,9.280854,8.883873)
)

CoinMetrics %>% 
    mutate(date = dmy(date)) %>% 
    ggplot(aes(x = date, y = AdrActCnt)) +
    geom_point() + 
    geom_line() +
    labs(title = "Time Series")


# You can also plot several variables at the same time
CoinMetrics %>% 
    mutate(date = dmy(date)) %>%
    gather(Metric, Value, -date) %>% 
    ggplot(aes(x = date, y = Value, color = Metric)) +
    geom_point() + 
    geom_line() +
    labs(title = "Time Series")

Created on 2020-01-20 by the reprex package (v0.3.0.9000)

Ok thanks, how can I include all dates in the dataset, instead of a subsection, is there any command for this?

Just use your actual dataset instead of the sample data I'm using

Alright I tried that, but doesn't work:

CoinMetrics <- data.frame(stringsAsFactors = FALSE, "date", "PriceUSD")
CoinMetrics %>% mutate(date = dmy(date)) %>% ggplot(aes(x = date, y = PriceUSD)) + geom_point() + geom_line() + labs(title = "Time Series")
Error in as.character(x) :
cannot coerce type 'closure' to vector of type 'character'

Can you explain what are you trying to accomplish with this line? If you already have CoinMetrics loaded in memory, why are you trying to define it again? I think you are misunderstanding the example I gave you, I do that step because I have to generate sample data to use with my code, you don't need that step because you already have data loaded in your environment.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.