[R] How to avoid saving the row index of a data.frame into MySQL ?
Ptit_Bleu
ptit_bleu at yahoo.fr
Thu Oct 11 14:29:45 CEST 2007
Hello everybody,
I have data in a data.frame "data" whose structure is given below.
I would like to save them into a MySQL database.
It works quite well with dbWriteTable but with this function, it also save
the number of the rows (see what I get from MySQL below the data.frame
structure.
Is there a way to avoid this, that is to save my 15 columns and not 16 ?
Thanks in advance for your help.
Ptit Bleu.
---------------------------------------------------------------
Structure of the data.frame (with ls.str())
data : 'data.frame': 1439 obs. of 15 variables:
$ V1 : chr "01/03/2007 10:02:19" "01/03/2007 10:02:49" "01/03/2007
10:03:19" "01/03/2007 10:03:49" ...
$ V3 : num 4.87 2.11 2.44 3.19 2.25 1.44 1.96 2.36 0.34 3.84 ...
$ V4 : num 10.8 10.9 10.9 10.9 11.1 11.2 11.3 11.3 11.5 11.6 ...
$ V5 : int 581 591 673 736 754 725 738 662 554 452 ...
$ V6 : num 1.57 1.59 1.83 1.99 2.03 1.96 1.99 1.79 1.49 1.21 ...
$ V7 : num 1.63 1.65 1.88 2.05 2.1 2.02 2.04 1.85 1.55 1.27 ...
$ V8 : num 0.401 0.401 0.401 0.401 0.401 0.402 0.401 0.4 0.401 0.402 ...
$ V9 : num 245 244 246 246 246 ...
$ V10: num 5.04 5.15 5.82 6.35 6.46 6.2 6.25 5.63 4.73 3.82 ...
$ V11: num 417 419 418 415 413 ...
$ V12: num 416 419 416 415 413 ...
$ V13: num 49 49 49 49 49 ...
$ V14: num 16.3 16.2 16.9 17.5 17.5 18.1 18.4 18.9 19.1 19.5 ...
$ V15: num 360 360 360 360 360 360 360 360 360 360 ...
$ V16: num 14.0 14.0 14.0 14.0 14.0 ...
---------------------------------------------------------
First columns saved in the MySQL database
1059 |01/03/2007 18:51:20 |1.33 |10.9 |0 |0.02 | ...
1060 |01/03/2007 18:51:50 |0.17 |10.8 |0 |0.00 | ...
1061 |01/03/2007 18:52:20 |0.39 |10.8 |0 |0.00 | ...
1062 |01/03/2007 18:52:50 |1.44 |10.8 |0 |0.00 | ...
--
View this message in context: http://www.nabble.com/How-to-avoid-saving-the-row-index-of-a-data.frame-into-MySQL---tf4606925.html#a13154777
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list