'creating function to convert list of tables into single data frame

I am trying to create a function which can produce a single dataframe from list of dataframes like here t1 is creating a sub tables and i want t_final to produce a single data frames from the list of tables created by t1.

table_list1[[i]] <- t1 is creating if list of tables and these tables should convert into list of tables with one blank row between them

df <- mtcars

df1 <- subset(df, vs==1)
df2 <- subset(df, am==1)
df3 <- subset(df, gear==3)

#after this i want to create a list of table produced by t1, and then #create single in final table "t_final" as list of tables    
    # #colnames(t1)[1] <- list1[[d]]
    # df_lst[[i]] <- t1
    # sep_line <- rep("", ncol(df_lst[[i]]))
    # table_list1 <- lapply(df_lst[[i]], function(x)x %>%
    #                         mutate(across(where(is.numeric), ~round(.x, 2)),
    #                                across(everything(), ~as.character(.x))) %>%
    #                         rbind(., sep_line))
    # 
    # t2 <- bind_rows(df_lst)
    # rownames(t2) <- NULL
    # t2 <- t2[-nrow(t2), ]
  
  
  }
}

r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source