GAS KALI

nama_A<- c("puput", "Anton", "Fayyadh", " Dane", "Messis", "Dodo", "Tana", "Al", "Budal", "Budawg")

Tinggi_A<- c(163, 180, 175, 181, 167, 123, 124, 156, 200, 100)

BERAT_A<- c(63, 80, 75,81, 67, 23, 24, 56, 27, 17)

kelas <- data.frame(nama_A, Tinggi_A, BERAT_A)

kelas
##     nama_A Tinggi_A BERAT_A
## 1    puput      163      63
## 2    Anton      180      80
## 3  Fayyadh      175      75
## 4     Dane      181      81
## 5   Messis      167      67
## 6     Dodo      123      23
## 7     Tana      124      24
## 8       Al      156      56
## 9    Budal      200      27
## 10  Budawg      100      17

NASI PADANG

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:

mean(kelas$BERAT_A)
## [1] 51.3
mean(kelas$Tinggi_A)
## [1] 156.9

Gulai ayam

You can also embed plots, for example:

## rrata berat bdn: 51.3 kg

AYAM RENDANG

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

modus <- function(x)  {
  ux  <- unique(x)
  ux[which.max(tabulate(match(x, ux)))]
}

modus_bbdn <- modus(BERAT_A)
cat("modus_bbdn", modus_bbdn, "kg", "\n")
## modus_bbdn 63 kg

DENDENG BATAOKOK

modus <- function(x)  {
  ux  <- unique(x)
  ux[which.max(tabulate(match(x, ux)))]
}

modus_tngg <- modus(Tinggi_A)
cat("modus_tngg", modus_tngg, "kg", "\n")
## modus_tngg 163 kg
range_bbdn <- range(kelas$BERAT_A)
cat("range_bbdn", range_bbdn, "\n")
## range_bbdn 17 81
range_tngg <- range(kelas$Tinggi_A)
cat("range_tngg", range_tngg, "\n")
## range_tngg 100 200
sd_bbdn <- sd(kelas$BERAT_A)
cat("sd_bbdn", sd_bbdn, "\n")
## sd_bbdn 25.78996
sd_tngg <- sd(kelas$Tinggi_A)
cat("sd_tngg", sd_tngg, "\n")
## sd_tngg 31.46232
hist(kelas$Tinggi_A, col = "cyan",
main= "HISTROGRAM TINGGI BADAN ",
xlab= "Tinggi badan (kg)")

barplot(kelas$Tinggi_A, col = "pink",
main= "barplot TINGGI BADAN ",
xlab= "Tinggi badan (kg)")

plot(kelas$Tinggi_A, col = "red",
main= "plot TINGGI BADAN ",
xlab= "Tinggi badan (kg)")