I am completely stuck with creating a table out of a following code:
table4a = NY %>%
group_by(loan_type) %>%
summarize(
min_amt = min(loan_amount, na.rm=TRUE),
max_amt = max(loan_amount, na.rm=TRUE),
mean_amt = mean(loan_amount, na.rm = TRUE))
table4a <- as.data.table(table4a)
Basically, I need the min, max, and mean of amounts by type of loan in a table, but it's just not working; I know I can create separate mins and maxs and means by loan type and plug them into a matrix, but I feel like there has got to be a better way! Please help!