I have some mixed-type data that I would like to store in an R data structure of some sort. Each data point has a set of fixed attributes which may be 1-d numeric, factors, or
I would also use strings for the variable length data, but as in the following example: "c(5,5)" for the first phrase. One needs to use eval(parse(text=...))
to carry out computations.
For example, the mean
can be computed as follows:
sapply(data$token_lengths,function(str) mean(eval(parse(text=str))))