```
x <- c(2.2, 7.8, -4.4, 0.0, -1.2, 3.9, 4.9, 2.0, -5.7, -7.9, -4.9,  28.7,  4.9)

quartiles<-function(x){
bound<-quantile(x)
MED<-median(x)
k<-c(). #put values of x less than median in vector K
S<-c(). #put values of x larger than median in vector S

for(i in 1:length(x)){
  if (x[i]<MED){
K<-x[i]}
else{S<-x[i]
}
i<i+1
}
  iqr1<-c(median(k)-median(S)) #calculate interquartile for x
return(list(bound[2],bound[4], iqr1))  
}

```

I would like to get the value in return for `iqr1` but I am getting:

> 
> quartiles(x) [[1]] 25%
> -4.4
> 
> 
> [[2]] 75%
> 4.9
> 
> 
> [[3]] numeric(0)
> 
> 
>