From the examples in the documentation, ?densityyou (almost) get an answer.
, - :
library("stats")
data <- c(0,0.08,0.15,0.28,0.90)
pdf_of_data <- density(data, from= 0, to=1, bw=0.1)
N <- 1e6
x.new <- rnorm(N, sample(data, size = N, replace = TRUE), pdf_of_data$bw)
hist(x.new, freq = FALSE)
lines(pdf_of_data)

, .
, .