data <- read.csv(file.choose())
head(data)
## X...
## 1 title: Untitled
## 2 output: html_document
## 3 ---
## 4 ```{r}
## 5 data <- read.csv(file.choose())
## 6 ```
tail(data, 10)
## X...
## 36 summary(data$Age)
## 37 mean(data$Age
## 38 na.rm = TRUE)
## 39 min(data$Albumin
## 40 na.rm = TRUE)
## 41 ```
## 42 ```{r}
## 43 boxplot(data$Age
## 44 main = Boxplot Usia)
## 45 ```
View(data)
str(data)
## 'data.frame': 45 obs. of 1 variable:
## $ X...: chr "title: Untitled" "output: html_document" "---" "```{r}" ...
typeof(data$Age)
## [1] "NULL"
class(data)
## [1] "data.frame"
nrow(data)
## [1] 45
ncol(data)
## [1] 1
dim(data)
## [1] 45 1
colnames(data)
## [1] "X..."
rownames(data)
## [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15"
## [16] "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30"
## [31] "31" "32" "33" "34" "35" "36" "37" "38" "39" "40" "41" "42" "43" "44" "45"
if(ncol(data) >= 3){
data[,3]
} else {
warning("Kolom ke-3 tidak tersedia")
}
## Warning: Kolom ke-3 tidak tersedia
data$Gender
## NULL
summary(data)
## X...
## Length:45
## Class :character
## Mode :character
summary(data$Age)
## Length Class Mode
## 0 NULL NULL
mean(data$Age, na.rm = TRUE)
## Warning in mean.default(data$Age, na.rm = TRUE): argument is not numeric or
## logical: returning NA
## [1] NA
min(data$Albumin, na.rm = TRUE)
## Warning in min(data$Albumin, na.rm = TRUE): no non-missing arguments to min;
## returning Inf
## [1] Inf