How to use Levene test function in R? I'm a newbie to statistics and R and I have a trouble with using Levene function (I would like to check the equality of variance of two samples). 
The documentation says that I should run:

levene.test(y, group)

But I have no idea what I should put as y and group? I have two different samples which of I would like to check the equality of variance. Should I put one of the sample's values as y and the second as group parameter?
Any hints? 
 A: The easiest way (in my opinion) to prepare the data is using reshape2 package:
#Load packages
library(reshape2)
library(car)

#Creating example data
sample1 <- rnorm(20)
sample2 <- rnorm(20)

#Combine data
sample <- as.data.frame(cbind(sample1, sample2))

#Melt data
dataset <- melt(sample)

#Compute test
leveneTest(value ~ variable, dataset)

A: Let's say that, in R, your 1st sample is stored in a vector named sample1 and your 2nd sample is stored in a vector named sample2. 
You first have to combine your two samples in a single vector and to create another vector defining the two groups:
y <- c(sample1, sample2)

and
group <- as.factor(c(rep(1, length(sample1)), rep(2, length(sample2))))

Now, you can call
library(car)
levene.test(y, group)

EDIT
When trying this in R, I got the following warning:
'levene.test' has now been removed. Use 'leveneTest' instead...

According to this, you should have a look at leveneTest instead...
A: Ocram's answer has all of the important pieces.  However, you don't need to load all of Rcmdr if you don't want to.  The relevant library is "car".  But as ocram indicates, levene.test is deprecated.  Note that the deprecation is not a change of functionality or code (at this point, 09/18/2011).  It simply is a change in the function name.  So levene.test and leveneTest will work the same.  For the record I thought I'd provide an example using leveneTest and reusable reshaping code for this simple case:
#Creating example code
sample1 <- rnorm(20)
sample2 <- rnorm(20)

#General code to reshape two vectors into a long data.frame
twoVarWideToLong <- function(sample1,sample2) {
    res <- data.frame(
        GroupID=as.factor(c(rep(1, length(sample1)), rep(2, length(sample2)))),
        DV=c(sample1, sample2)
    )   
}   

#Reshaping the example data
long.data <- twoVarWideToLong(sample1,sample2)

#There are many different calls here that will work... but here is an example
leveneTest(DV~GroupID,long.data)

