I am trying to convert multiple variables from dbl to intergers in one block of code but I get the below error. Can someone help me overcome this error. I have included code below.
Error message: Error: unexpected ')' in:
"Green<- (Red) %>%
mutate(a= as.integer (a))& b = as.integer (b))"
Red <- tibble(
a = c( 1,2),
b = c(3,4),
c = c(5,6))
#Convert varible a,b, and c from double to integer variable
Green<- (Red) %>%
mutate(a= as.integer (a))& b = as.integer (b)) & c =as.integer (c))