Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with categorical array #60

Open
PharmCat opened this issue Dec 16, 2024 · 1 comment
Open

Error with categorical array #60

PharmCat opened this issue Dec 16, 2024 · 1 comment

Comments

@PharmCat
Copy link

data = DataFrame(
    concentration = [1.2, 4.5, 2.0, 1.5, 0.1, 1.8, 3.2, 1.8, 1.2, 0.2],
    id = repeat([1, 2], inner = 5),
    time = repeat([0, 0.5, 1, 2, 3], 2)
)
transform!(data, :id => categorical, renamecols=false)

listingtable(
    data,
    :concentration => "Concentration (ng/mL)",
    rows = :id => "ID",
    cols = :time => "Time (hr)",
    summarize_rows = [
        length => "N",
        mean => "Mean",
        std => "SD",
    ]
)
ERROR: Sorting the input dataframe for grouping failed.
This can happen when a column contains special objects intended for table formatting which are not sortable, for example `Concat`, `Multiline`, `Subscript` or `Superscript`.
Consider pre-sorting your dataframe and retrying with `sort = false`.
Note that group keys will appear in the order they are present in the dataframe, so usually you should sort in the same order that the groups are given to the table function.
@jkrumbiegel
Copy link
Collaborator

This works for me on the latest version, can you re-check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants