I'm looking to figure out what's going on with the generation of this frequency table for each attribute by variant number. For some reason I keep getting a 'all arguments must have same length' error for the table in the for() argument.
I've checked the names of the variants are correct, and ensured that length(jar.beta$variant) is equal to length(jar.beta$overall) and all of the other attributes but it's not behaving. The attributes are vectors, but I've tried to change them to factors. 
Hoping to find some help. Thanks in advance!
#Sample Input
library(tibble)
jar.beta <- tribble(
  ~date, ~variant, ~appearance, ~crunch, ~spring, ~density, ~season, ~salt, ~overall,
  1-1-19, 11, 4, 5, 6, 1, 4, 2, 5,
  1-1-19, 11, 4, 5, 1, 1, 3, 7, 8,
  1-1-19, 1.4, 1, 1, 6, 1, 2, 2, 2.5,
  1-1-19, 1.4, 4, 5, 6, 1, 4, 2, 5,
  1-1-19, 1.3, 4, 5, 6, 1, 4, 2, 5,
  1-1-19, 1.3, 4, 5, 6, 1, 4, 2, 5
)  
jar.beta$variant <- as.factor(jar.beta$variant)
jar.beta$date <-as.factor(jar.beta$date)  
#Code in Question 
percentage <- vector("list", 7)                     
names(percentage) <- colnames(jar.beta[3:9])
for (i in 1:9){
    attribute.freq  <- table(jar.beta$variant,jar.beta[,i+2])
    percentage[[i]] <- as.matrix(100*prop.table(attribute.freq,margin=1),2)
    }
#Desired Output as a Percent Frequency Table
                 2   2.5     3   3.5     4   4.5     5   5.5     6   6.5     7     8   8.5
  11         16.67 33.33 16.67  0.00  0.00  0.00 16.67  0.00  0.00  0.00 16.67  0.00  0.00
  1.4        0.00  0.00 16.67  0.00 16.67 16.67 50.00  0.00  0.00  0.00  0.00  0.00  0.00
  1.3        0.00  0.00  0.00  0.00  0.00  0.00 66.67 16.67  0.00  0.00  0.00  0.00 16.67
