thanks for this really cool package!
Sometimes in codebooks, it can be helpful to have a comma separated list of unique values in the dataframe.
e.g. a dataframe like this:
data.frame(geo = c("GBR","DEU","FRA","GBR"), value = c(1,2,3,4))
Could have a unique values output for character values, that defaults to all unique values: "GBR, DEU, FRA" and when the string exceeds a certain amount of options cut after x values or x str_length() and display something like: "GBR, DEU, [...]", whereas numeric values could display something like: "1-4", etc. This would be extremely helpful for data-frame with large numbers of variables that are not labelled in any form.
Now, please try to ignore the horrible way this is written, but this is a quick work-around that I am using right now, which obviously is not very robust...
Hi,
thanks for this really cool package! Sometimes in codebooks, it can be helpful to have a comma separated list of unique values in the dataframe.
e.g. a dataframe like this:
Could have a unique values output for character values, that defaults to all unique values: "GBR, DEU, FRA" and when the string exceeds a certain amount of options cut after x values or x str_length() and display something like: "GBR, DEU, [...]", whereas numeric values could display something like: "1-4", etc. This would be extremely helpful for data-frame with large numbers of variables that are not labelled in any form.
Now, please try to ignore the horrible way this is written, but this is a quick work-around that I am using right now, which obviously is not very robust...
Please let me know if I am overlooking some function in this package.
Thanks a bunch!