OK, this is pretty wacky code but it is all I could think of. I use the rnorm function to make an example of 50 samples from \mathcal{N}(0,1) and then I extract from the data the points that are closest to the values given by rnorm. Having data with many points in the region typical of \mathcal{N}(0,1) is required for this to work decently, I think.Out of curiosity, why do you want to do this?
set.seed(1)
DAT <- runif(2500, min = -5, max = 5)
TRGT <- rnorm(50)
mean(TRGT)
#> [1] 0.3986448
sd(TRGT)
#> [1] 1.053185
GetNearest <- function(x, D){
tmp <- min(abs(x - D))
idx <- which(abs(x - D) == tmp)
D[idx[1]]
}
SMPLS <- vector("numeric", 50)
for (i in 1:50) {
SMPLS[i] <- GetNearest(TRGT[i], DAT)
}
mean(SMPLS)
#> [1] 0.3990898
sd(SMPLS)
#> [1] 1.053693
Created on 2020-02-05 by the reprex package (v0.3.0)