[R] question

Carolyn J Miller cjm|||04 @end|ng |rom @yr@edu
Mon Jan 30 19:16:10 CET 2023


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]]



More information about the R-help mailing list