I have the following function, 'n' rolls of 'k' dice, in which the result is the sum of 'k' rolls.
rolldie = function(n, k){
# Your code here
die=sample(1:6, size = k, replace = TRUE)
replicate(n, sum(sample(c(1:6),k, replace=TRUE)))
}
rolldie(5, 4)
I then have to create a ggplot histogram to show the results of the function, using n=1000 with whatever values of k. That is where I am stuck, I am not sure how to create this histogram for the results of rolldie.

