R studio, se a convertido en una aplicacion de gran importancia, ya que nos permite trabajar con gran cantidad de datos estadisticos, en un tiempo extremadamente rapido, contribuyendonos a un menor esfuerzo al momento de realizar un trabajo #
mango<-15
mango<-43
mango<-7
24 + 2# Suma
3 - 17 # Resta
4*2 # Multiplicacion
97 / 8 # Divicion
9 ^ 2 # 9 al cuadrado
#R RESOLVIENDO PREGUNTAS
8 == 6 # es igual?
3 == 3 # es igual?
15 != 4 # es distino?
27> 48 #
27< 48 #
100>= 100
68<= 53
se puede redondear los numeros, a las aproximaciones mas cercanas #
help(package= "datasets")
data("Orange")
head(x=Orange)
## Tree age circumference
## 1 1 118 30
## 2 1 484 58
## 3 1 664 87
## 4 1 1004 115
## 5 1 1231 120
## 6 1 1372 142
tail(x=Orange)
## Tree age circumference
## 30 5 484 49
## 31 5 664 81
## 32 5 1004 125
## 33 5 1231 142
## 34 5 1372 174
## 35 5 1582 177
head(Orange, n=1)
## Tree age circumference
## 1 1 118 30
tail(Orange, n=7)
## Tree age circumference
## 29 5 118 30
## 30 5 484 49
## 31 5 664 81
## 32 5 1004 125
## 33 5 1231 142
## 34 5 1372 174
## 35 5 1582 177
str(Orange)
## Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame': 35 obs. of 3 variables:
## $ Tree : Ord.factor w/ 5 levels "3"<"1"<"5"<"2"<..: 2 2 2 2 2 2 2 4 4 4 ...
## $ age : num 118 484 664 1004 1231 ...
## $ circumference: num 30 58 87 115 120 142 145 33 69 111 ...
## - attr(*, "formula")=Class 'formula' language circumference ~ age | Tree
## .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv>
## - attr(*, "labels")=List of 2
## ..$ x: chr "Time since December 31, 1968"
## ..$ y: chr "Trunk circumference"
## - attr(*, "units")=List of 2
## ..$ x: chr "(days)"
## ..$ y: chr "(mm)"
nrow(Orange)
## [1] 35
ncol(Orange)
## [1] 3
dim(Orange)
## [1] 35 3
names(Orange)
## [1] "Tree" "age" "circumference"
rm(Orange)
# cargando nuevamente
data("Orange")