InsideDarkWeb.com

Latin Hypercube Sampling (LHS) in R

I am new to R and would like to generate Latin Hypercube samples (LHS) for three variables within the following limts:

  • 1.25 ≤ x1 ≤ 5 ,

  • 1.25 ≤ x2 ≤ 5

  • 7 ≤ x1 ≤ 25

with total 3*10 = 30 samples.

What is the syntax to be used in Rstudio?

Geographic Information Systems Asked by Bineet on November 12, 2021

1 Answers

One Answer

I would recommend using the lhs package documentation for reference

You would need to install the released version of lhs from CRAN

install.packages("lhs")

or via devtools

devtools::install_github("bertcarnell/lhs")

in your case a example to create a random LHS with 30 samples and 3 variables would be:

X <- randomLHS(30, 3)

Answered by whyzar on November 12, 2021

Add your own answers!

Related Questions

How QGIS Python loop through all tables MS SQL Server?

2  Asked on August 5, 2021 by flavio-felix

       

Show Label on Map in Open Layers

0  Asked on August 4, 2021 by sudarshank

   

OSM Buildings – problem adding .obj file

1  Asked on August 4, 2021 by minisaurus

   

Save to GitHub from QGIS

3  Asked on August 4, 2021

     

Rounding numbers in Raster Legend in QGIS?

2  Asked on August 4, 2021 by thomas-ljungberg

   

SAGA hydrology toolbox Error: select a library

2  Asked on August 3, 2021 by ciaran-broderick

       

Fastest way to union a set of polygons in R

1  Asked on August 3, 2021 by jeppe-olsen

     

R lidR CRS as WKT

1  Asked on August 3, 2021

     

Ask a Question

Get help from others!

© 2021 InsideDarkWeb.com. All rights reserved.