vasishth/bayescogsci

unnecessary c() in first code chunk of section 5.1

inigourrestarazu opened this issue · 1 comments

The first code chunk in section 5.1 goes as follows:

N_subj <- 20
N_obs_subj <- 50
N <- N_subj * N_obs_subj
df <- tibble(row = 1:N,
             subj = rep(c(1:N_subj), each = N_obs_subj))
df

I think the c() in the rep function can be dropped and it will work just the same:

df <- tibble(row = 1:N,
             subj = rep(1:N_subj, each = N_obs_subj))

yes, thank you!
it'll be updated next time we compile the book