I'm trying to solve a practice question in R from a textbook(the tibble is copied from it). I can see the object is created in the environment, it looks good, I can see that the names of the columns are changed as they should be. However, the code itself shows errors. Is there something wrong with it?
#Practice 2 (book of R)
annoying <- tibble(
`1` = 1:10,
`2` = `1` * 2 + rnorm(length(`1`))
)
#> Error in tibble(`1` = 1:10, `2` = `1` * 2 + rnorm(length(`1`))): could not find function "tibble"
#Create another column 3 = col1/col2
annoying$new<-annoying$'2'/annoying$'1'
#> Error in eval(expr, envir, enclos): object 'annoying' not found
#> Error in eval(expr, envir, enclos): object 'annoying' not found
Created on 2022-06-28 by the reprex package (v2.0.1)