create a table that counts the number of times each integer from 1 to 100 appears in an array, a row for every integer from 1 to 100 in r
# Create an array of random integers
set.seed(123)
arr <- sample(1:100, 1000, replace = TRUE)
# Create a table that counts the occurrences of each integer from1to100table_result <- table(arr)
# Fill inanymissingvalueswith0table_result <- table_result[match(1:100, names(table_result))]
table_result