Closed abduazizR closed 1 year ago
Hi,
Thanks for posting.
I'm not very familiar with mutate
, as I generally don't write R code with tidyverse
packages. Are you trying apply the bc.mean.sd
function to a collection of studies to estimate their means, etc? If so, I generally write a for loop to apply the bc.mean.sd
function separately to each study (Note that bc.mean.sd
does not allow vector inputs, which is likely the cause of the error message). Alternatively, the metamean
function in the metamedian
package accomplishes this for you, and long-form documentation of the package is available here.
Does this resolve your question? Also, feel free to reach out by email (sean_mcgrath@g.harvard.edu) if you have general questions about meta-analysis of studies reporting medians.
Best, Sean
Thank you for the very quick response. I am actually doing meta regression and I need to use age which is in some studies summarizes as mean and in others summarized as medians. I would like to convert the medians to means to proceed with the meta regression step. I have a column for each of element of the bc. mean. sd
function. I wanted to create a new column that stores the transformed my mean.
Got it. That makes sense.
I think the easiest solution would be to write a for loop that iterates over the rows of your data set, where in the ith iteration you apply the bc.mean.sd
function to the data in the ith row of your data set. Does that make sense?
I'm going to mark this as closed as it has been around a week, but please reach out if you have any lingering questions
Hi,
First of all, thank you so much for the very powerful package. I am wondering if it's possible to utilize its functions to be called inside a
mutate
function. Here is an example:I hope you have solution for this