I have three rasters that I want to extract values corresponding to `x (row)= 5 and y (column) = 7` in each raster so I will get three values.

```
 r <- raster(nrows=10, ncols=10)
 r <- setValues(r, 1:ncell(r))
 r1 <- raster(nrows=10, ncols=10)
 r1 <- setValues(r1, 1:ncell(r))
 r2 <- raster(nrows=10, ncols=10)
 r2 <- setValues(r1, 1:ncell(r))
St=stack(r,r1,r2)

```

I tried 
 extract(St, c(5, 7))

but this gave :

```
      extract(St, c(5, 7))
         layer.1 layer.2 layer.3
    [1,]       5       5       5
    [2,]       4      4       4

```

I read my actual files as:

```
    dir1<- list.files("/data/datman", "*.img", full.names = TRUE)

    for (i in 1:697) {
         conne <- file(dir1[i], "rb")
        file<- readBin(conne, numeric(), size=4,  n=500*1000, signed=T)
       file <- raster(t(matrix((data= file), ncol=500, nrow=1000)))}

```

Any help?