Independence of two categorical variables & chi-square I have data as follows:
DF=structure(c(18.8275862068966, 263.914742451155, 2.68965517241379, 
9.61278863232682, 26, 162.54351687389, 2.68965517241379, 45.4422735346359, 
1.79310344827586, 10.4866785079929), .Dim = c(2L, 5L), .Dimnames = list(
    c("N", "O"), c("3", "5", "1", "2", "4")))

N= The person is not a regular consumer.
O= The person is a regular consumer.
From 1 to 5 is 5 different products. In total I have 544 tested products. The number are float because I ponderate them since some persons can choose 2 products simultaneously. So the Sum of all the value would give 544.
I want to do a test of chi-square so, Degree of freedom would be in this case 4.
My null hypothesis is there is no relation between being a regular consumer and the chosen product. the alternative is the opposite.
How to do this in R and how to interpret results?
I Tried chisq.test(DF,4)
   Pearson's Chi-squared test

data:  DF
X-squared = 10.048, df = 4, p-value = 0.03963

How R know which is my null hypothesis and the alternative one, and how interpret this if my work is correct?
EDIT: In my data I have 90% régular consumers vs 10% non-regular. Does this cause a problem in my analyses? Should I correct it, and if so, how?
I saw also in my courses that for using chi-square there are two assumptions rolled into one:
No expected count less than one at any of our cells; and no more than 20% of our cells with an expected count less than five.
And here with my data I think that I have more than 3 column that violate this assumption. 
Finally, with this p-value =0.03 I should reject my $H_0$ and conclude that my categories are dependent?
Thanks!
 A: If you look for the documentation on ?chisq.test in R you'll find that if your input is a matrix, as in your case:

Pearson's chi-squared test is performed of the null hypothesis that
  the joint distribution of the cell counts in a 2-dimensional
  contingency table is the product of the row and column marginals.

In this particular scenario the idea is a test of homogeneity, whereby the data are collected by randomly sampling from each sub-group (several populations - "regular" (N) v "non-regular consumer" (O)) separately. The null hypothesis is that each sub-group shares the same distribution of a single categorical variable ("likes of different products" (?)). The $\text{H}_0$ is implied by the mechanics of the chi-squared calculation, but can be conceptually framed in this way. 
You can get a sense of what is being done under the chisq.test() function by looking at several of its output listed values, such as the actual versus expected counts in each cell. Here are the actual values rounded off:
(actual = addmargins(round(DF,0)))
      3  5   1  2  4 Sum
N    19  3  26  3  2  53
O   264 10 163 45 10 492
Sum 283 13 189 48 12 545

and expected:
(expected = addmargins(round(chisq.test(DF)$expected,0)))
      3  5   1  2  4 Sum
N    27  1  18  5  1  52
O   256 11 171 44 11 493
Sum 283 12 189 49 12 545

The conditions where the chi square statistic is approximated by the theoretical chi square distribution require that the sample size be reasonably large: there should be at least $5$ expected cases in at least $80\,%$ of the cells (with all the cells having expected values $>1$). 
So we may have a problem in terms of the low number of counts in some of the cells. A possible way of addressing the issue would be to group together adjacent categories to boost the number of expected cases.
Alternatively, we can perform a Monte Carlo simulation with the following call:
chisq.test(DF,simulate.p.value = T)

    Pearson's Chi-squared test with simulated p-value (based on 2000
    replicates)

data:  DF
X-squared = 10.0481, df = NA, p-value = 0.05297

I have broken down the steps involved in this computation in this background document, which roughly parallels your OP with very reduced cells and counts to follow every step effortlessly.
One of the issue that you bring up is the discrepancy between N and O clients. In the Monte Carlo simulation within the chisq.test() function the probabilities for each cell are uniformly $\small 1/\text{no. of cells}$. However, there is an option to change the vector of probabilities, which could work to be proportional to the cells in the rows (each row corresponding to each different type of customer):
    probabilities = c(rep(sum(DF[1,]) / (sum(DF)*5), 5), rep(sum(DF[2,]) / (sum(DF)*5), 5))
    round(probabilities,2)
    [1] 0.02 0.02 0.02 0.02 0.02 0.18 0.18 0.18 0.18 0.18
    chisq.test(DF,simulate.p.value = T, p = probabilities)

        Pearson's Chi-squared test with simulated p-value (based on 2000 replicates)

    data:  DF
    X-squared = 10.048, df = NA, p-value = 0.04898

And this could be considered a statistically significant result at a significance level of $5\%$.
