I don't know how you have imported the xlsx file into Rstudio, but it appears that the numeric column has been converted to a logical representation.
df <- data.frame(
values = c(-2, -1, 0, 1, 2),
val_logical = as.logical(c(-2, -1, 0, 1, 2))
)
df
#> values val_logical
#> 1 -2 TRUE
#> 2 -1 TRUE
#> 3 0 FALSE
#> 4 1 TRUE
#> 5 2 TRUE
str(df)
#> 'data.frame': 5 obs. of 2 variables:
#> $ values : num -2 -1 0 1 2
#> $ val_logical : logi TRUE TRUE FALSE TRUE TRUE
Created on 2021-02-01 by the reprex package (v1.0.0)
You might find the readxl package quite helpful as it, if needed, also offers a way of specifying explicitely the column types.