How can I create two matrices with meshgrid function in R?
<p>I am beginer in R but I have experience in Matlab. In Matlab I could create two matrices with meshgrid function by the following way:</p>

<pre><code>[lon, lat]=meshgrid(lon, lat) 
</code></pre>

<p>where lon and lat are vectors with length_lon=424 and length_lat=412. The resulted lon and lat martices are 424x412. 
How can I carry out this method in R?
I would appreciate if you helped me!</p>