Estimados
Intentaba hacer el gráfico de forest plot imitando los códigos de un
libro, lo del libro sale bien (parte de arriba, lo mio (parte de abajo
no sale y no veo porque, apreciaria su ayuda.
Adjunto ambas bases de datos
LA DEL LIBRO QUE FUNCIONA
rm(list = ls())
library(readr)
data1 <- read_csv("000 EN DISEñO/00 Meta/LIBRO/dataset01.csv")
View(data1)
wd=("D:/Public/Documents/000 EN DISEñO/00 Meta/"LIBRO")
# 1. Read in the data
data1 <- read.csv("dataset01.csv", as.is=TRUE)
2. Print structure of R object data1
str(data1)
# 3. To view an R object, just type its name:
data1
# 1. Load add-on package meta
library(meta)
# 2. Do meta-analysis
m <- metacont(Ne, Me, Se, Nc, Mc, Sc,
studlab=paste(author, year),
data=data1)
# 3. Produce forest plot
forest(m, xlab="Maximum % fall in FEV1")
#=====================================================================
HAGO ESTO CON UNA BASE DE DATOS MIA EN EXCEL Y NO ME FUNCIONA
rm(list = ls())
library(readxl)
data1 <- read_excel("000 EN DISEñO/00 BIA/guia1.xlsx")
View(data1)
2. Print structure of R object data1
str(data1)
# 3. To view an R object, just type its name:
data1
attach(data1)
# 1. Load add-on package meta
library(meta)
# 2. Do meta-analysis
m <- metacont(Fat,SD1, Sist, SD2,
studlab=paste(author, year),
data=data1)
##AQUI ME DICE
Error: Provide either argument 'mean.c' or 'median.c'
# 3. Produce forest plot
forest(m, xlab="Maximum % fall in FEV1")
------------ próxima parte ------------
A non-text attachment was scrubbed...
Name: dataset01.csv
Type: text/csv
Size: 757 bytes
Desc: no disponible
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20220619/34e4117a/attachment.csv>
------------ próxima parte ------------
A non-text attachment was scrubbed...
Name: guia1.xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 10094 bytes
Desc: no disponible
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20220619/34e4117a/attachment.xlsx>