[R] question

Ebert,Timothy Aaron tebert @end|ng |rom u||@edu
Tue Jan 31 04:22:02 CET 2023


Can you please show us a small sample of your data? The first 5 or 10 lines should be good enough.
Tim

-----Original Message-----
From: R-help <r-help-bounces using r-project.org> On Behalf Of Carolyn J Miller via R-help
Sent: Monday, January 30, 2023 1:16 PM
To: r-help using r-project.org
Subject: [R] question

[External Email]

Hi guys,

I am using the cor() function to see if there are correlations between March cortisol levels and December cortisol levels and I'm trying to figure out if the function is doing what I want it to do.

Each sample has it's own separate row in the CSV file that I'm working out of. March Cort and December Cort are different columns and they come from separate samples, therefore their values would not be on the same row. There are only 3 individuals that have both December cort values and March cortisol values but they still have different sample ID values (from different seasons) so they are also not on the same row.

 I ran the function twice: once as cor(cortphcor, use = "complete.obs") first

and then cor(cortphcor, use = "pairwise.complete.obs", method = "pearson").

I received the same output both times. I guess what I'm asking is, is the output simply the correlation just for those 3 samples or is the second pairwise. complete.obs version giving me the correlation for all of the cort samples for March against all of the samples for December despite not being on the same row? I'm trying to figure out how many sample values are contributing to the correlation results I'm getting.

Thanks,

Carolyn


        [[alternative HTML version deleted]]

______________________________________________
R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C01%7Ctebert%40ufl.edu%7Cdd5773a499934ef0fd3a08db032d0447%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C638107264114367125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=YxPstnNkhcAvtY7SdBGpW3LFFubZl2WKaEuc29qh40Y%3D&reserved=0
PLEASE do read the posting guide https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.html&data=05%7C01%7Ctebert%40ufl.edu%7Cdd5773a499934ef0fd3a08db032d0447%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C638107264114367125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OxrAXBA2yjPy%2B94tKkiQ34adp%2BPrNPcpp2SE81ZEUZ4%3D&reserved=0
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list