library(ggplot2)
library(plotly)
## Warning: package 'plotly' was built under R version 3.5.3
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
esta es una presentacion de markdown correspondiente a la semana3 del curso Developind Data
plotly()
## Warning in open.connection(con, "rb"): no fue posible abrir el archivo 'C:
## \Users\sp19250199-ext\Documents/.plotly/.credentials': No such file or
## directory
## Warning in open.connection(con, "rb"): no fue posible abrir el archivo 'C:
## \Users\sp19250199-ext\Documents/.plotly/.config': No such file or directory
## Warning: You need a plotly username. See help(signup, package = 'plotly')
## Warning: Couldn't find username
## Warning in open.connection(con, "rb"): no fue posible abrir el archivo 'C:
## \Users\sp19250199-ext\Documents/.plotly/.credentials': No such file or
## directory
## Warning in open.connection(con, "rb"): no fue posible abrir el archivo 'C:
## \Users\sp19250199-ext\Documents/.plotly/.config': No such file or directory
## Warning: You need an api_key. See help(signup, package = 'plotly')
## Warning: Couldn't find api_key
## Warning: 'plotly' is deprecated.
## Use 'ggplotly' instead.
## See help("Deprecated")
## Warning: 'plotly' is deprecated.
## Use 'plot_ly' instead.
## See help("Deprecated")
head(economics)
## # A tibble: 6 x 6
## date pce pop psavert uempmed unemploy
## <date> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1967-07-01 507. 198712 12.6 4.5 2944
## 2 1967-08-01 510. 198911 12.6 4.7 2945
## 3 1967-09-01 516. 199113 11.9 4.6 2958
## 4 1967-10-01 512. 199311 12.9 4.9 3143
## 5 1967-11-01 517. 199498 12.8 4.7 3066
## 6 1967-12-01 525. 199657 11.8 4.8 3018
(economics)
## # A tibble: 574 x 6
## date pce pop psavert uempmed unemploy
## <date> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1967-07-01 507. 198712 12.6 4.5 2944
## 2 1967-08-01 510. 198911 12.6 4.7 2945
## 3 1967-09-01 516. 199113 11.9 4.6 2958
## 4 1967-10-01 512. 199311 12.9 4.9 3143
## 5 1967-11-01 517. 199498 12.8 4.7 3066
## 6 1967-12-01 525. 199657 11.8 4.8 3018
## 7 1968-01-01 531. 199808 11.7 5.1 2878
## 8 1968-02-01 534. 199920 12.3 4.5 3001
## 9 1968-03-01 544. 200056 11.7 4.1 2877
## 10 1968-04-01 544 200208 12.3 4.6 2709
## # ... with 564 more rows
dim (economics)
## [1] 574 6
str (economics)
## Classes 'spec_tbl_df', 'tbl_df', 'tbl' and 'data.frame': 574 obs. of 6 variables:
## $ date : Date, format: "1967-07-01" "1967-08-01" ...
## $ pce : num 507 510 516 512 517 ...
## $ pop : num 198712 198911 199113 199311 199498 ...
## $ psavert : num 12.6 12.6 11.9 12.9 12.8 11.8 11.7 12.3 11.7 12.3 ...
## $ uempmed : num 4.5 4.7 4.6 4.9 4.7 4.8 5.1 4.5 4.1 4.6 ...
## $ unemploy: num 2944 2945 2958 3143 3066 ...
Entrada como primer argumento de entrada y devuelve un objeto de trazado modificado