Q:

Concatenating CSV files into single data frame in R, why am I still getting list as the class when I use typeof?

Here's the zip file to the specdata directory with all the CSV files in it:
https://d396qusza40orc.cloudfront.net/rprog%2Fdata%2Fspecdata.zip
I'm trying to get all the files into a data frame so I can use complete.cases, this code creates a list of data frames but not a single data frame so I am currently getting errors when trying to use complete.cases. I looked at using merge but I can't seem to wrap my head around how to use merge inside a for loop with multiple files. I have tried implementing rbind and I think I'm close to getting it that way but I also can't seem to figure out how to use it correctly inside a for loop. I am a beginner, trying to understand for loops before I move on vectorized functions like lapply.    
Here's the code:
complete<- function(directory, id=1:332){
        data<-NULL
        for (i in 1:length(id)) {
                data[[i]]<- c(paste(directory, "/",formatC(id[i], width=3, flag=0),".csv",sep=""))     
        }
        cases<-NULL

        for (d in 1:length(data)) { 
                cases[[d]]<-c(read.csv(data[d]))
        }
        df<-NULL
        for (c in 1:length(cases)){
                df[[c]]<-(data.frame(cases[c]))
        }
        df

}

A:

The first thing to do is remove the for loops (if you are a beginner, then just get into the apply family right off the bat, for-loops in R are sometimes easier, but the apply family is the R way).
files <- list.files()
data <- lapply(files,function(x) read.csv(x))

Then depending on whether you actually want merge or rbind (because they are not the same)
data_rbind <- do.call("rbind", data)

Or
merge.df <- Reduce(function(x, y) merge(x, y, all=T,by="your_value",sort=F), data, accumulate=F)

