2 Answers
2

table will try to create a matrix of length(unique(FIELD1)) by length(unique(FIELD2)), presumably many times the size of your original data; a more efficient representation is as a data frame of counts, along the lines of

This solution uses a single read.csv.sql statement to read the data into an SQLite database (which it automatically creates), perform the calculation in the database (not in R) and then only read it into R after the calculation has ben performed. Thus although it does not do a table it still shows which FIELD1 values are associated with each FIELD2 value and does so via a more compact representation.