Reputation: 13
This is my chunk. I looked at the recomended page, and tried what I could. I don´t know how to fix it and knit it successfully:
```{r 2a, echo=FALSE, eval=TRUE, warning=FALSE, message=FALSE }}
tokio <- read.csv("tokio_2021.csv", header = TRUE)
tokio <- tokio%>%arrange(country)
media_pob_gdp <- mean(tokio$gdp_pc)
media_pob_poblacion <- mean(tokio$population)
muestra.paises_AM <- tokio$country[1:128]
tokio_AM <- tokio%>%filter(country %in% muestra.paises_AM)
mean(tokio_AM$gdp_pc)
alpha <- 0.05
n <- length(tokio_AM$gdp_pc)
xBarra <- mean(tokio_AM$gdp_pc)
s <- sd(tokio_AM$gdp_pc)
lim_inf <- xBarra - (s/sqrt(n))*(qt(1-alpha/2,n-1))
lim_sup <- xBarra + (s/sqrt(n))*(qt(1-alpha/2,n-1))
IC_gdp <- c(lim_inf, lim_sup)
IC_gdp
```
at some point it gives 128 names as characters, so i suspect there's a problem printing that or some instruction to print them is missing. It CAN run te last variables and print a number, but I cant knit it whichever the case.
This is the whole error:
processing file: Tarea1_MA_entr.Rmd
(*) NOTE: I saw chunk options "2a, echo=FALSE, eval=FALSE, warning=FALSE, message=FALSE }"
please go to https://yihui.org/knitr/options
(it is likely that you forgot to quote "character" options)
Error in parse(text = code, keep.source = FALSE) :
<text>:1:67: unexpected '}'
1: alist( '2a', echo=FALSE, eval=FALSE, warning=FALSE, message=FALSE }
^
Calls: <Anonymous> ... parse_params -> withCallingHandlers -> eval -> parse_only -> parse
Execution halted
Thank you,
Upvotes: 1
Views: 1235
Reputation: 44887
You will get that error if you have mistakenly typed the closing brace twice, e.g.
```{r 2a, echo=FALSE, eval=FALSE, warning=FALSE, message=FALSE } }
There are probably other ways to get it; if this doesn't look like what you did, please post the actual code you used.
Upvotes: 1