Hello @Lev_ani ,
you can do this with aid of the purrr package:
library(purrr)
a <- list('han','lev',0, 2, 3.14,FALSE,'Paris',TRUE)
as <- list( char=a[purrr::map_lgl(a,is.character)],
num=a[purrr::map_lgl(a,is.numeric)],
log=a[purrr::map_lgl(a,is.logical)] )
str(as)
#> List of 3
#> $ char:List of 3
#> ..$ : chr "han"
#> ..$ : chr "lev"
#> ..$ : chr "Paris"
#> $ num :List of 3
#> ..$ : num 0
#> ..$ : num 2
#> ..$ : num 3.14
#> $ log :List of 2
#> ..$ : logi FALSE
#> ..$ : logi TRUE
Created on 2021-05-15 by the reprex package (v2.0.0)