How does that code works? The main goal was to asign a string to a variable and then make a dataframe which the first column is the string. So in this case you could do that:
# column1 <- "Student Name"
df1 <- tibble(`Student Name` = rep('fill', 3))
But that's not the challenge.
If you try this:
column1 <- "Student Name"
df1 <- tibble(`column1` = rep('fill', 3))
It doesn't work as well.
So, browsing in the internet i found this solution, and it works
column1 <- "Student Name"
df1 <- tibble({{column1}} := rep('fill', 3))
But still, i don't know how this code works, i know that he uses curly curly operator, which i've never seen before, and this ':=' operator as well. Can someone explain how does that work? I've searched for this curlycurly operator but was a little bit hard to comprehend.