In your comment, you suggest that you might have wanted to use Wilcoxon rank sum test or t test. This implies that you are interested in some aspect of location. (The t test tests means, the Wilcoxon tests whether one distribution is different from another in the sense that
null hypothesis that, for randomly selected values X and Y from two
populations, the probability of X being greater than Y is equal to the
probability of Y being greater than X.
Your locations are identical: Both sets have mean = 1, median = 1 and no variation. So, no test of any hypothesis about location is needed or reasonable.
But in your question, you ask about sums. Well, of course 18 is greater than 9, but, for this, what is your sample and population and hypothesis? For t-test or similar, each item in each vector is an observation, so you have 27 observations. But for sums, each vector is an observation and you have only 2 observations. Not much you can do with that, at least, not without a lot more information.
prop.test(c(18,9),rep(100,2))
. Is this what you are looking for? $\endgroup$