chisq.test in R with a single vector (Note: This is a question from a colleague, but I am posting it myself and answering it for posterity, since others might have a similar question.)
Usually when you use the chisq.test function in R you are using it on a contingency table of data, which is a matrix with multiple rows and columns.  However, if you use it on a single vector of numbers it still gives you output:
x <- c(10.4, 8.6, 8.0, 3.4, 3);
chisq.test(x)

Chi-squared test for given probabilities

data:  x
X-squared = 6.5222, df = 4, p-value = 0.1634

Has anyone come across this before?  What is R thinking at this point?
 A: This is actually perfectly sensible output.  The chisq.test function is taking the input vector as its first argument x and all other arguments are set to their default values in the function (since you have not specified any values for them).  If you have a look at the documentation for this function you will see that it gives the default values for the other arguments (e.g., y = NULL) and it also tells you what the function does in cases where you only give it a single vector as the x input:

Details
If x is a matrix with one row or column, or if x is a vector and y is not given, then a goodness-of-fit test is performed (x is treated as a one-dimensional contingency table). The entries of x must be non-negative integers. In this case, the hypothesis tested is whether the population probabilities equal those in p, or are all equal if p is not given. 

Thus, in this particular case, since you have not specified any y argument and your x argument is a vector, the chisq.test function is performing Pearson's chi-squared goodness-of-fit test, comparing the input data against the expected values that would obtain if each category is equally likely.  (In this case your input values are not integers so they can't be interpreted as counts, but the test is performed anyway using the standard Pearson chi-squared statistic.)  We can replicate the results of the test manually as follows:
#Replicate goodness-of-fit test on data x
n     <- length(x);
PROB  <- rep(1, times = n)/n;
EXP   <- PROB*sum(x);
CHISQ <- sum((x - EXP)^2/EXP);
df    <- n-1;
P_VAL <- pchisq(CHISQ, df, ncp = 0, lower.tail = FALSE);

#Show output values
CHISQ;
[1] 6.522156
P_VAL;
[1] 0.1633997

#Compare manual output values to chisq.test function
MOD <- chisq.test(x);
identical(CHISQ, as.numeric(MOD$statistic));
[1] TRUE
identical(P_VAL, MOD$p.value);
[1] TRUE

You can see that this manual calculation replicates the same output as the chisq.test function in this case (though the latter function also has some other outputs that are not printed when you call it).  This confirms the test that is being done.
