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

Enable horizontal alignment by decimal point in apa_table.latex() #51

Open
crsh opened this issue Aug 26, 2015 · 3 comments
Open

Enable horizontal alignment by decimal point in apa_table.latex() #51

crsh opened this issue Aug 26, 2015 · 3 comments

Comments

@crsh
Copy link
Owner

crsh commented Aug 26, 2015

Unless the align parameter is specified in a call to apa_table.latex(), it seems to me that aligning columns with numbers by decimal point is a sensible default. The siunitx package seems like a good option to achieve this (see example here).

@TheDom42
Copy link

TheDom42 commented Sep 11, 2018

Hi there, has this been somehow implemented or is this under development? If tried generating a an apa_table from an afex_output and I noticed that the F-values were not correctly aligned on the decimal point.
I manually edited the generated LaTeX-file to use siunitx, and it worked for the alignment. However, using an S-column-type from siunitx leads to the addition of leading zeros for the p-values (even if they are not actually typed out in the table).

EDIT: I actually just found a solution to the leading zero problem. Adding \sisetup{add-integer-zero=false} keeps the zeros from appearing in p-values.
Maybe a combination of the code below and this information can help you develop an option for papaja?

Those are the two options and their results
Option 1

l
S[table-format=2.2]
S[table-format=1.2]
S[table-format=2.2]
S[table-format=1.2]
c
S[table-format=0.3]


grafik

Option 2

l
S[table-format=2.2]
S[table-format=1.2]
S[table-format=2.2]
S[table-format=1.2]
S[table-format=<.3]
S[table-format=0.3]

grafik

@TheDom42
Copy link

On a sidenote: the afex-tables produced by apa_table completely ignore the table options passed to afex (such as reporting of the uncorrected dfs or use of pes instead of ges). It would be good to correct this as otherwise wrong results might be displayed (e.g. when Mauchly is not significant, I want uncorrected dfs). This is also true for reporting the results in the text, as full_result also ignores these options.
Also: in a regular apa_table call to an afex object, the effect sizes in the last column of the table (see also above) are not corrected to gt1 = F (they are displayed with a leading zero).

@crsh
Copy link
Owner Author

crsh commented Sep 12, 2018

Hi Dominik,

thanks for the documentation of your attempts. I have not had time to add this feature and I'm afraid it will be a little while until I get around to it. But it's stilled planned for a future release. You are, however, welcome to submit a pull request, if you like.

Regarding the second issue: Could you open a new issue for this and add a reproducible example?

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

No branches or pull requests

2 participants