Using quanteda 0.99.9027, the following throws an error about "too many replacement values":
testText <- c("brown brown yellow green", "yellow green blue")
(testDfm <- dfm(tokens(testText)))
testWeights <- rnorm(4)
names(testWeights) <- featnames(testDfm)
testWeights
dfm_weight(testDfm, weights=testWeights)
Using quanteda 0.99.9027, the following throws an error about "too many replacement values":