csv - RE: Importing awkward dataset to R -
i have csv datasets (so-called datras "exchange data" ices) in unusual format making challenge efficiently import them r workspace.
the files laid out so:
v1 v2 v3 ... v60 ................ ................ ................ v2.1 v2.2 v2.3 ... v2.27 ........................ ........................ v3.1 v3.2 v3.3 ... v3.27 ........................ ........................
so, issue two-fold: there 3 sets of (related) data stacked on top of 1 in csv file wish able import 3 separate objects in r; , these datasets have different dimensions , colnames.
so far, have been using count.fields()
on files in directory identify boundaries between each dataset, readlines()
read entire file character string each row of data, subsetting these chaacter strings acording values derived count.fields()
.
are there more direct methods? feel approach using quite inelegant. should noted these large csv files.
Comments
Post a Comment