2

I have a CSV file that is structured as follows:

  1. Date (mm/dd/yyyy)
  2. Experiment Number (1)
  3. Header (several lines of text)
  4. colN1 colN2 colN3 ...
  5. data11 data12 data13 ...
  6. data21 data22 data23 ... ...

Repetitive up to experiment 52. Now, the number of dataNX is not fixed meaning that the size of each table is different. I would like to read this data into a RSQLite database where I can query each experiment number and get the table that corresponds to it but I am not sure how. Kindly help.

adamkonrad
  • 6,794
  • 1
  • 34
  • 41
Kimlotte
  • 55
  • 6
  • There is no such thing as an *RSQLite DB*. RSQLite is a library to read a SQLite database in R. So [import your csv](https://www.sqlite.org/cli.html) into an SQLite database and then connect that db in R with this module. – Parfait Aug 22 '16 at 19:40
  • You could try `dbWriteTable(con, "new_table_name", "file-name.csv")` and specify delimiters and such in additional parameters. See `?dbWriteTable()`. – krlmlr Aug 22 '16 at 22:36
  • 2
    All I wanna know is how to turn the data in that format into a database. That's it. So please (parfait) try to help not correct me !! Thanks krlmlr – Kimlotte Aug 23 '16 at 07:01

0 Answers0