-
Notifications
You must be signed in to change notification settings - Fork 0
/
codigo_R.txt
56 lines (39 loc) · 1.34 KB
/
codigo_R.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
####################
## CARGA DE DATOS ##
####################
cripto<-read.csv(file="consolidated_coin_data.csv",header=TRUE,sep=",")
##datos vacios
sapply(cripto, function(x)(sum(is.na(x))))
#######################
## ANALISIS DE DATOS ##
#######################
cripto_f <- subset(cripto, Currency=='bitcoin')
stripchart(Open ~ Date, vertical=TRUE, method="stack", ylab="Open", data=cripto_f)
stripchart(Close ~ Date, vertical=TRUE, method="stack", ylab="Close", data=cripto_f)
stripchart(High ~ Date, vertical=TRUE, method="stack", ylab="High", data=cripto_f)
stripchart(Low ~ Date, vertical=TRUE, method="stack", ylab="Low", data=cripto_f)
### grafico de velas, especifico de cotizaciones
library(ggplot2)
qplot(Date, Open, data=cripto_f,
geom = 'boxplot',
fill=I("lightskyblue"),
col=I("cornflowerblue")
)
qplot(Date, Close, data=cripto_f,
geom = 'boxplot',
fill=I("lightskyblue"),
col=I("cornflowerblue")
)
qplot(Date, High, data=cripto_f,
geom = 'boxplot',
fill=I("lightskyblue"),
col=I("cornflowerblue")
)
qplot(Date, Low, data=cripto_f,
geom = 'boxplot',
fill=I("lightskyblue"),
col=I("cornflowerblue")
)
###NORMALIZAR DATOS#####
library("scales")
cripto_norm <- rescale(cripto_df)