Assuming I understand your problem correctly, I have two possible solutions:
1. one column per element: if your vectors have the same number of elements, you can save each of them in a separate column. Based on your example above, the table might look like this. (column size and zero tolerance or independent of your data)
CREATE TABLE `myTable` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `element1` varchar(255) DEFAULT NULL, `element2` varchar(255) DEFAULT NULL, `element3` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
The statement to insert your vector on top:
INSERT INTO `myTable` (`id`, `element1`, `element2`, `element3`) VALUES (1, 'hi', 'I', 'am');
Depending on how many elements your vectors have this approach may be more or less applicable.
2. Storing a vector as a blob: Another approach would be to save the vector as a blob . Blob (Binary Large Object) is a data type for storing a variable sum of (binary) data (see https://dev.mysql.com/doc/refman/5.7/en/blob.html ). This idea is taken from this article: http://jfaganuk.imtqy.com/2015/01/12/storing-r-objects-in-sqlite-tables/
A table can be created using the following statement:
CREATE TABLE `myTable` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `myVector` blob, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
When you insert your vector, you bind a variable to your query. Since I'm not an R specialist, I would like to refer to this article for implementation details.