I can't reproduce your issue with the data you are providing (see example below), please provide a proper reproducible example for your issue as explained in the link I gave you before.
hw1.1 <- data.frame(stringsAsFactors=FALSE,
pid_root = c(1, 1, 2, 1, 3, 3),
slider_undoc = c(5, 5, 20, 50, 11, 20),
vote2020 = c(1, 1, 2, 4, 4, 2),
income = c(8, 9, 11, 1, 8, 11),
education = c(6, 5, 5, 1, 4, 3),
st_postal = c("MO", "NJ", "MA", "LA", "NC", "AZ"),
sex = c(0, 0, 1, 0, 0, 0),
system_justification = c(3.714286, 4.428571, 3, 4.285714, 3.857143, 4.571429),
blame_attribution = c(0, 0.125, 0.125, 0.125, 0, 0),
restriction = c(1.2, 2, 1.8, 4, 1.8, 1.4)
)
mean(hw1.1$blame_attribution[hw1.1$pid_root==2], na.rm=TRUE)
#> [1] 0.125
sd(hw1.1$blame_attribution[hw1.1$pid_root==2], na.rm=TRUE) # Not possible to calculate with just one value
#> [1] NA
median(hw1.1$blame_attribution[hw1.1$pid_root==2], na.rm=TRUE)
#> [1] 0.125
IQR(hw1.1$blame_attribution[hw1.1$pid_root==2], na.rm=TRUE)
#> [1] 0
Created on 2019-10-28 by the reprex package (v0.3.0.9000)