Why data arrays? Why binary?


#1

I’m interested to know why so much of Pan X is devoted to data arrays and other binary stuff. When and why is it better to store data in a data array rather than in a text array? Maybe processing speed?

michael


#2

A data array has two advantages: it can store any type of item as an element, such as text, a number, a dictionary, an array, or other things. Second, it does not have a separator, which allows you to include or build an array from data without worrying about whether your separator character is in the data. It also has some disadvantages: it cannot be viewed directly since it is stored as binary data, but must be created, viewed, and accessed with a formula that converts it to some readable format. Jim advised during the class that he did not know if there was a significant performance advantage to using a data array. Jim demonstrated some very clever uses, such as

exportdataarray(generatedataarray(12,|||datepattern(datevalue(2015,seq(),1),"Month")|||))

Try this in formula workshop.


#3

Thanks Tom - a most erudite explanation. I like Jim’s example.

I guess the video you’re referring to is either Data Values or Data Collections - I’m not there yet in my viewing, I’d better get back into it.

michael


#4

I guess another advantage of data arrays over text arrays is that you could do math operations on array elements without having to convert them to numeric.

m