March 2019
Beginner to intermediate
250 pages
6h 6m
English
First, we are going to analyze the types of variables that we have in the dataset. For that, we can use the class function, which tells us whether a variable is a number, a character, or a matrix. For example, the class of the identifying number of a bank ID_RSSD can be obtained as follows:
class(Model_database$ID_RSSD) ## [1] "integer"
This function indicates that this variable is a number without decimals.
We can calculate the same information for all the variables and store it using the following code:
classes<-as.data.frame(sapply(Model_database, class)) classes<-cbind(colnames(Model_database),classes) colnames(classes)<-c("variable","class")
With sapply, calculate iteratively the class function on the dataset. Then, combine ...
Read now
Unlock full access