我想表达如下:
2<= x<3, but if I put c(paste0(2 ," <= x <", 3), the result is the one in image 1, which I don't like.
另一方面,如果我把 c(paste0(2 ," <= x", 3), the expression less or equal, is the correct one. Image 2
代码是这样的:
dataP2 <- data.frame(c("F(x)"),c("0") ,c(0.1), c(0.29), c(0.59),c(0.74), c(0.89), c(1))
colnames (dataP2) <- c( c("X"), c(paste0("x <", 2)),c(paste0(2 ," <= x", 3),c(4),c(5),c(6),c(7), c(paste0("x >=",7))))
tt <- ttheme_default(colhead=list(fg_params = list(parse=TRUE)))
grid.table(dataP2, rows = NULL, theme=tt)
我必须输入什么才能使表达式变成这样?图3