#data()
datos1=AirPassengers
plot(datos1)
interpretar:
datos2=co2
plot(datos2)
#interpretar: tiene tendencia, tiene factor estacional,aditivo
datos3=iris
write.csv(datos3,"datos iris.csv")
#getwd()
para leer un archivo excel previamente se debe installer la libreria readx
#install.packages("readxl")
#install.packages("writexl")
library(readxl)
## Warning: package 'readxl' was built under R version 4.5.1
library(writexl)
## Warning: package 'writexl' was built under R version 4.5.1
datos4=read_excel("Regresion Lineal Simple.xlsx",sheet = 2)
datos4
## # A tibble: 5 × 2
## ca cb
## <dbl> <dbl>
## 1 1 4
## 2 2 3.5
## 3 3 2.8
## 4 4 1.9
## 5 5 0.8
datos5=read_excel("Variable ficticia - copia.xlsx",sheet = 1 )
## New names:
## • `` -> `...4`
datos5
## # A tibble: 7 × 5
## ingreso sexo educacion ...4 `series hombre=sexo="Hombre"`
## <dbl> <chr> <chr> <lgl> <chr>
## 1 800 Hombre Secundaria NA "series mujer=sexo=\"Mujer\""
## 2 500 Mujer Primaria NA "series primaria=educacion=\"Primaria\""
## 3 200 Mujer Primaria NA "series secundaria=educacion=\"secundaria\""
## 4 4500 Mujer Superior NA "series suyperior=educacion=\"superior\""
## 5 5000 Hombre Superior NA "ls ingreso c mujer"
## 6 1250 Mujer Secundaria NA "series mujer=sexo=\"Mujer\""
## 7 1500 Hombre Superior NA "ls ingreso c mujer"
datos4
## # A tibble: 5 × 2
## ca cb
## <dbl> <dbl>
## 1 1 4
## 2 2 3.5
## 3 3 2.8
## 4 4 1.9
## 5 5 0.8
head(datos4)
## # A tibble: 5 × 2
## ca cb
## <dbl> <dbl>
## 1 1 4
## 2 2 3.5
## 3 3 2.8
## 4 4 1.9
## 5 5 0.8