Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
238 views
in Technique[技术] by (71.8m points)

R Markdown: Object not found while doing funnel() in the `meta` package

I am aware that my question is similar to a previous thread. However, I believe that my case is different. I am experiencing Object not found error while knitting my markdown. However, I believe that the dataset is loaded correctly in the R Markdown environment.

Below is the code chunk I wrote in my R Markdown:

library(meta)
library(metafor)
library(readxl)

data.binary <- read_xlsx(path="data/metabin.xlsx")
View(data.binary)

ma.binary <- metabin(
                    event.e = ee,
                    n.e = ne,
                    event.c = ec,
                    n.c = nc,
                    studlab = paste(Author),
                    data = data.binary,
                    comb.fixed = TRUE,
                    comb.random = TRUE,
                    method.tau = "DL",
                    hakn = FALSE,
                    prediction = TRUE,
                    sm = "RR"
                    )
forest(ma.binary)

funnel(ma.binary, xlab = "Risk Ratio")

The above chunk returns this error:

Error in funnel(ma.binary, xlab = "Risk Ratio") : object 'ma.binary' not found Calls: <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> funnel

I have tried clearing my environment with rm(list = ls()) but the problem persists. Furthermore, when I delete the funnel(ma.binary, xlab = "Risk Ratio") part, the chunk runs perfectly fine, hence I believe that the dataset is loaded correctly in the R Markdown.

Is something wrong with my code chunk?

Thank you very much for the help

Best,

question from:https://stackoverflow.com/questions/65844482/r-markdown-object-not-found-while-doing-funnel-in-the-meta-package

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...