Test of uniform distribution using KS-test and chi square in R I want to test if a given sample $x$ of $n = 500$ continuous observations is uniformly distributed on a given interval of $[a,b]$ ($a = min(x)$ and $b = max(x)$). Therefore I would like to compare the results of the one-sample KS-test and the Chi-Square test in R given a significance level of 1%. As I am totally new to R, I'm not really sure about the code: So let x be a numeric vector with the given observations. 
KS-Test: ks.test(x, "punif") --> question: looks quite wrong to me, how can I specify the significance level?
Chi-Square-Test: chisqr.test(x) --> seems to be even worse... and once again: after I get the code syntax right: how do I integrate the significance level?
Even if I know, this is a real "low-level-question": thanks for any help! ;)
 A: Edit: This answer heavily revised. 
One problem in your code may be that punif defaults to a minimum of 0 and a maximum of 1.  If these aren't correct for your purposes, they need to be specified 
To conduct the hypothesis test, you would compare the reported p value to your selected alpha value (0.01, as stated in the question). 
You don't need this line, but it makes the results reproducible for the purpose of this example.
set.seed(sum(utf8ToInt("SalLikesKittens")))

Create some data.  Let's say your data range from 5 to 10.
Values = runif(500, min = 5, max = 10)

Plot a histogram of the data.
hist(Values, col="darkgray")


Conduct the KS test.  Here the p value (0.615) is greater than your alpha (0.01), so you don't have good evidence to reject the null hypothesis.  The null hypothesis is that the data follow a uniform distribution from the minimum value to the maximum value.
ks.test(Values, "punif", min(Values), max(Values))

   # One-sample Kolmogorov-Smirnov test
   # 
   # data:  Values
   # D = 0.033862, p-value = 0.6151
   # alternative hypothesis: two-sided

Here, the red curve is the theoretical cumulative distribution and the black circles are the observed values.
plot(ecdf(Values))
curve(punif(x, min(Values), max(Values)), add=TRUE, col="red")


Above we used the min and the max from the observed values.  However, you can also specify theoretical min and max values. Here, of course, the data don't fit well a uniform distribution from 6 to 9.
ks.test(Values, "punif", 6, 9)

   # One-sample Kolmogorov-Smirnov test
   # 
   # data:  Values
   # D = 0.21611, p-value < 2.2e-16
   # alternative hypothesis: two-sided

plot(ecdf(Values))
curve(punif(x, 6, 9), add=TRUE, col="red")


