encode a list of numbers into a value (compression) while considering the order of the elements

34 Views Asked by At

this is using the R programming language. i was wondering if there is a way in which one can encode a list or array of digits into a single value...

what i mean is, if given lists of numbers [1,2,3,4,5] and [5,4,3,2,1] and/or [1,2,5,4,3], one can do calculation on all three sequences and get different results showing that they are not the same(the order matters). i.e get an answer with a sign or something...

is there a formula or a process i can use to achieve this...

ps:

i have tried std, variance, mean, g-mean, h-mean e.t.c and they all give the same result.

this is just an example... the values in the list can be any real number. concatenating the elements can only results to a string not a number ie [1,2,3.4,4.3,5]

EDIT:

its a dataframe where the rows contain positional element which represent a list of 32 elements(the labels/headers of these list are different but similar across other list) and each row has 11 elements... i.e my datafame [q,w,e,r,t,y] where q = [1,2,3,4] and w=[2,3,4,2.4] etc.. the headers of q, w, e, r, t, y are the same in the same order... by placing the list themselves inside the dataframe will only add more columns and this is what i am trying to avoid...