Here's a way using the data.table package:
Load the package:
library(data.table)
Load your vectors as you had them defined:
id <- c(1,2,3,4,5,6)
cost <- c(11,22,33,44,55,66)
name <- c("aa","bb","cc","dd","ee","ff")
Turn the vectors into single column data tables:
id.dt<-data.table(id)
setnames(id.dt,"id")
cost.dt<-data.table(cost)
setnames(cost.dt,"cost")
name.dt<-data.table(name)
setnames(name.dt,"name")
Combine columns, set a key (this might be unneeded for this example, but I included it just to show:
tableone.dt<-cbind(id.dt,cost.dt)
setkey(tableone.dt,id)
tabletwo.dt<-cbind(name.dt,id.dt)
setkey(tabletwo.dt,id)
Merge the tables:
merge(tableone.dt,tabletwo.dt)
Of course this is a round-about way of doing it. If it suits your needs you can easily simplify the process. For example:
simple.table <- data.table("id"=c(1,2,3,4,5,6),"cost"=c(11,22,33,44,55,66),"name"=name <- c("aa","bb","cc","dd","ee","ff"))
or Thomas's comment will work. Also, do see the link commented by flodel.