I want to append a new column with 173
rows
to a new empty dataframe and I have got this error
Error in data.frame(..., check.names = FALSE) :
les arguments impliquent des nombres de lignes différents : 173, 0
My expected output is a dataframe "dataint" with all class columns integer from my original dataframe "data"
dataint<-data.frame()
for (i in 1:ncol(data))
if(class(data[[i]])=="integer")
{ dataint<-cbind(dataint,data[[i]])
}
libarary(dplyr); data %>% select_if(is.integer)
data[sapply(data, is.integer)]