View source: R/Util_DB_MIUR_num.R
Util_DB_MIUR_num | R Documentation |
This function transforms the output variables of the Get_DB_MIUR
into Boolean or Numeric.
Additionally, it removes the columns with an excessive number of missing observations (20.000 by default), and if required it may also delete the rows including missing fields.
In this case, it is possible to keep track of the deleted rows.
Util_DB_MIUR_num(
data = NULL,
include_numerics = TRUE,
include_qualitatives = FALSE,
row_cutout = FALSE,
track_deleted = TRUE,
verbose = TRUE,
col_cut_thresh = 20000,
flag_outliers = TRUE,
autoAbort = FALSE,
...
)
data |
Object of class |
include_numerics |
Logical. Whether to include strictly numeric variables alongside with Boolean ones. |
include_qualitatives |
Logical. Whether to include qualitative variables alongside with Boolean ones. |
row_cutout |
Logical. Whether to filter out rows including missing fields. |
track_deleted |
Logical. If |
verbose |
Logical. If |
col_cut_thresh |
Numeric. The threshold of missing values allowed for each variable.
If a variable as a higher number of missing observations, then it is cut out. |
flag_outliers |
Logical. Whether to assign NA to outliers in numeric variables. |
autoAbort |
Logical. In case any data must be retrieved, whether to automatically abort the operation and return NULL in case of missing internet connection or server response errors. |
... |
Additional arguments to the function |
The outliers to be set to NA
if flag_outliers
is active are defined as follows: School area or free area surface of less than 50 squared meters,
building volume of less than 150 cubic meters, 0 floors in the building.
If track_deleted == TRUE
, An object of class list
including two objects:
$data
: object of class tbl_df
, tbl
and data.frame
, the output dataframe.
$deleted
: object of class tbl_df
, tbl
and data.frame
. The school IDs of the deleted units.
If track_deleted == FALSE
, the output is only the first element of the list.
library(magrittr)
DB23_MIUR_num <- example_input_DB23_MIUR %>% Util_DB_MIUR_num(track_deleted = FALSE)
DB23_MIUR_num[, -c(1,4,6,8,9,10)]
summary(DB23_MIUR_num)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.