Description Usage Arguments Details Value Examples
devide the data into test and training set, and prepare the dataframe for modeling
1 2 3 4 5 6 7 |
originaldata |
original dataframe |
fraction, |
fraction for the training |
country2digit |
country code, 2 digit, if NA or not in the database, the world is returned, the sampling is equal fraction per country |
grepstring_rm |
the variables that are to be removed, grepl style, e.g. 'ID|LATITUDE|LONGITUDE|ROAD_0|geometry|countryfullname' |
rm_neg_col |
if True, the columes containing all negative values or 0s are removed |
NA values are removed. This function is used for preprocessing, can be improved.
inde_var the matrix containing response and predictors. Default is false.
1 2 3 4 | a = sampledf(merged, fraction = 0.8, 'ES')
test = a$test
training = a$training
inde_var = a$indevar
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.