dstanley4 / apaTables

Development version of apaTables R package. Current stable version is on the CRAN.
http://dstanley4.github.io/apaTables/
Other
55 stars 13 forks source link

apa.cor.table() is only limited to Pearson's method. #18

Open jooyoungseo opened 5 years ago

jooyoungseo commented 5 years ago

The current apa.cor.table() is fixed to Pearson's r for its method. Would there be any way for you to allow users to choose their desired correlation method among "pearson," "spearman," and "kendall"?

jdnewell commented 5 years ago

I just found your "apaTables" package and I think it is terrific! I would also like to encourage extending apa.cor.table() to be able to select between the pearson, spearman and kendall methods of correlation. In the documentation it would be helpful to say that only pearson correlations are supported at this time.

eric-kruger commented 5 years ago

Also thanks for the package. I have modified the apa.cor.table and now it uses the psych package as a dependency and allows you to specify the correlation type. See attached code.

apaCorrelationTable_mod.txt

jdnewell commented 5 years ago

Thanks Eric!!

Sent from my iPhone

On Apr 20, 2019, at 11:40 AM, Eric Kruger notifications@github.com wrote:

Also thanks for the package. I have modified the apa.cor.table and now it uses the psych package as a dependency and allows you to specify the correlation type. See attached code.

apaCorrelationTable_mod.txt

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

eric-kruger commented 5 years ago

I forgot, you'll need to implement a few other modified functions for this to work. located in this file. Just source the file in R. I recommend and downloading all the functions for this package and then replacing the modified files with their corresponding ones from the package and then loading them manually but using source()

Eric

apaTables_mod.txt Edit: spelling

c-mues commented 5 years ago

Hi Eric,

Something seems to still go wrong for me? " object 'RtfTable' not found" This seems crucial to export the table to word. I can't seem to figure out how that part of the code works though?

eric-kruger commented 5 years ago

Hmm. Not sure where that error is occurring. The previous modification may not have been complete. Attached is a .zip file of all the R functions with modifications. Make sure that you specify the correlation method is "kendall" otherwise it defaults to pearson.

apa_tables_mod.zip

RenatoPdosSantos commented 4 years ago

Thank you, @eric-kruger ! I was looking for this. I'll use it in my work and leave a feedback.

Mmmie2105 commented 4 years ago

Hi Eric,

I'm interested in this as well. I downloaded the zip-file, but it won't open. Something seems to be wrong with the zip-file...

XiaoyuZeng commented 4 years ago

Hmm. Not sure where that error is occurring. The previous modification may not have been complete. Attached is a .zip file of all the R functions with modifications. Make sure that you specify the correlation method is "kendall" otherwise it defaults to pearson.

apa_tables_mod.zip

Hi Eric, thanks for your contribution to this package. However, when I tried the modified function you provided, I got error that I did not get "txt.number" function. Any ideas about this error?

XiaoyuZeng commented 4 years ago

Hi Eric,

Something seems to still go wrong for me? " object 'RtfTable' not found" This seems crucial to export the table to word. I can't seem to figure out how that part of the code works though?

I solved this problem, and I thought you may want to know it. After replacing the functions with those from Eric, you need to source() at least these function:

source("D:/Program Files/R/R-3.6.3/library/apaTables/doc/apaCorrelationTable_mod.R")
source("D:/Program Files/R/R-3.6.3/library/apaTables/doc/apaTables.R")
source("D:/Program Files/R/R-3.6.3/library/apaTables/doc/rtfMakeTable.R")
source("D:/Program Files/R/R-3.6.3/library/apaTables/doc/rtfMakeDocument.R")
nowosie1 commented 4 years ago

HI Eric Ive been using your apa.cor.table function and it seems to be giving me the wrong means. My means should be between 50 and 60, but instead they are all well below 1. The values of the correlations are also different from what I get when running a basic correlation function ms <- cor(mean_speed[,7:32]) round(ms, 2) Any reason why this may be the case?

Thank you for your time

Robert. N

osimonse commented 4 years ago

Hi Eric,

I'm interested in this as well. I downloaded the zip-file, but it won't open. Something seems to be wrong with the zip-file...

Hi Eric, I was looking for this as well. I get the same: error message when opening the zip file. Any idea why?

le-cuz commented 3 years ago

Hi Eric, Something seems to still go wrong for me? " object 'RtfTable' not found" This seems crucial to export the table to word. I can't seem to figure out how that part of the code works though?

I solved this problem, and I thought you may want to know it. After replacing the functions with those from Eric, you need to source() at least these function:

source("D:/Program Files/R/R-3.6.3/library/apaTables/doc/apaCorrelationTable_mod.R")
source("D:/Program Files/R/R-3.6.3/library/apaTables/doc/apaTables.R")
source("D:/Program Files/R/R-3.6.3/library/apaTables/doc/rtfMakeTable.R")
source("D:/Program Files/R/R-3.6.3/library/apaTables/doc/rtfMakeDocument.R")

Hi, I'm struggling to find these files in my library. I don't seem to have a doc subfolder - could you assist?

jorgemcp commented 2 years ago

I am having the same issue here; any help would be appreciated! (even just links to the basic steps for noobs)