This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
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
Desafio 1 Operaciones :
var1= 7
var2= 4
var4=90
var = (var1+var2)/2
var
## [1] 5.5
var = sqrt(var2)
var
## [1] 2
var = cos(0)
var
## [1] 1
var = 2**3
var
## [1] 8
var = sqrt(25)+5-63*9
var
## [1] -557
var = cos(2)/2
var
## [1] -0.2080734
var = (pi*2)+25
var
## [1] 31.28319
var= (var4*100/20)*tan(10)
var
## [1] 291.7624
var = log1p(10)
var
## [1] 2.397895
var = sqrt(300)*log1p(100)/cos(30)
var
## [1] 518.2203
Desafio 2 Operaciones listas :
datos=matrix(c(6.2,3.4,5.1,7.2,5.3,50.3,33.2,45.3,60.3,47.8),nrow=5,ncol=2)
datos
## [,1] [,2]
## [1,] 6.2 50.3
## [2,] 3.4 33.2
## [3,] 5.1 45.3
## [4,] 7.2 60.3
## [5,] 5.3 47.8
colnames(datos)=c("peso(Kg)","talla(cm)")
rownames(datos)=c("SLOBODAN","ADOLF","KIM","FIDEL","AUGUSTO")
datos
## peso(Kg) talla(cm)
## SLOBODAN 6.2 50.3
## ADOLF 3.4 33.2
## KIM 5.1 45.3
## FIDEL 7.2 60.3
## AUGUSTO 5.3 47.8
var = (datos[1][1])+(datos[2][1])+(datos[3][1])+(datos[4][1])+(datos[5][1])
var
## [1] 27.2
var = datos*datos
var
## peso(Kg) talla(cm)
## SLOBODAN 38.44 2530.09
## ADOLF 11.56 1102.24
## KIM 26.01 2052.09
## FIDEL 51.84 3636.09
## AUGUSTO 28.09 2284.84
mat=matrix(c(7,5,6,3),nrow=2,ncol=2)
mat
## [,1] [,2]
## [1,] 7 6
## [2,] 5 3
det(mat)
## [1] -9
mat%*%(mat)
## [,1] [,2]
## [1,] 79 60
## [2,] 50 39
solve(mat)
## [,1] [,2]
## [1,] -0.3333333 0.6666667
## [2,] 0.5555556 -0.7777778
Desafio 3 Cachipun 1) Piedra 2) Papel 3) Tijera
source("sumar_num.R")
res_sum=sumar_num(1)
## [1] "Perdiste"
Desafio 4 Dataset :
data("ability.cov")
help('ability.cov')
## starting httpd help server ... done
summary("ability.cov")
## Length Class Mode
## 1 character character
Descripcion: Corresponde a la realizacion de 6 test a 112 personas, test general , imagen, bloques, laberinto, lectura y vocaulario
Fuente :Bartholomew, D. J. (1987). Latent Variable Analysis and Factor Analysis. Griffin.
Bartholomew, D. J. and Knott, M. (1990). Latent Variable Analysis and Factor Analysis. Second Edition, Arnold.
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.