BoulderCodeHub / RWDataPlyr

R package to read and manipulate data from RiverWareTM
3 stars 5 forks source link

Change FUN in period.apply() #118

Open rabutler-usbr opened 10 months ago

rabutler-usbr commented 10 months ago

Per Josh Ulrich (xts)

replace calls to period.apply(..., FUN = mean) with period.apply(..., FUN = colMeans) to avoid a message he is now posting in . The message shouldn't cause issues with your package on CRAN, but it may be confusing for end users. I looked through your packages and found cases that need to be changed in the following files:

xts_helperFunctions.R

He is adding a message to all calls to period.apply() when FUN = mean because it behaves differently than when FUN is any other math function (e.g. sum, median, sd, var, etc.). FUN = mean calculates the mean for each column separately, but it uses every column together for other functions.