Skip to content

creating horizontal dataframes with column names

1 message · Alexy Khrabrov

#
Greetings -- in order to write back to SQL databases, one needs to  
create a dataframe with values.  I can get column names of an existing  
table with sqlColumns.  Say I have a vector of values (if they're all  
the same type), or a list (if different).  How do I create a dataframe  
with column names given by my sqlColumns?  To make it concrete, how do  
we make a dataframe

A B C
1 2 3

out of

column.names <- LETTERS[1:3]
values <- 1:3

?
Cheers,
Alexy