I have an assignment where I need to write a function between two variables:
Write a function that takes a directory of data files and a threshold for complete cases and calculates the correlation between sulfate and nitrate for monitor locations where the number of completely observed cases (on all variables) is greater than the threshold. The function should return a vector of correlations for the monitors that meet the threshold requirement.
The part I am confused about is "threshold". I don't understand how "threshold" relates to finding the correlation between the two variables. Can someone help me understand or point me to where I can find more information?