How can I evaluate a density function in a grid of values and a grid of parameters?

Keywords: r function evaluation probability-density

Question: 

I want to evaluate a two-parameter density function in R in a grid of values of x and a grid of parameters.

say x = c(1,2,3,4,5), par1 = c(1,2,3), par2 = c(1.5,2.5,3.5). I want all the combinations of a density function evaluated at these values. This is, the triples

1,1,1.5

2,1,1.5

...

5,1,1.5

1,2,1.5

...

Evaluating directly the density at these values does not return the desired results.

say dlnorm(x,par1,par2)

x = c(1,2,3,4,5)
par1 = c(1,2,3)
par2 = c(1.5,2.5,3.5)
dlnorm(x,par1,par2)

I would like to get a grid/vector/matrix of values with the evaluation at each triplet.

Answers: