Cars Summary

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

What is the median of the first column?

median(cars[,1])  #or median(cars$speed)
## [1] 15

Extract the data for the following cryptoccurency: BTC

library(jsonlite)

Reading the URL

btc_url <- fromJSON("https://min-api.cryptocompare.com/data/v2/histoday?fsym=BTC&tsym=USD&limit=100")

Extracting the Data Table

btc_df <- btc_url$Data$Data
head(btc_df)
##         time     high       low     open volumefrom   volumeto    close
## 1 1750204800 105579.8 103547.15 104598.7   18605.58 1945024806 104927.9
## 2 1750291200 105264.4 103951.44 104927.9    9905.95 1036540458 104699.7
## 3 1750377600 106559.4 102367.77 104699.7   17700.79 1845670588 103313.3
## 4 1750464000 104021.0 100925.53 103313.3   11217.17 1151399558 102165.7
## 5 1750550400 103430.1  98264.46 102165.7   30700.21 3086806070 101015.4
## 6 1750636800 106134.1  99685.07 101015.4   35198.88 3606601777 105423.7
##   conversionType conversionSymbol
## 1         direct                 
## 2         direct                 
## 3         direct                 
## 4         direct                 
## 5         direct                 
## 6         direct

What is the maximum of daily close price for BTC in the data?

max_close <- max(btc_df$close, na.rm = TRUE)
max_close
## [1] 123374.6

Research Project