Print less than or equal sign in R?

前端 未结 2 1553
甜味超标
甜味超标 2021-01-27 07:53

I tried using \\u2264 for the less than or equal sign:

> names(table_A1) <- c(\"x\", \"P(X=x)\", \"P(X\\u2264x)\")
> print(table_A1)
         


        
2条回答
  •  梦毁少年i
    2021-01-27 08:17

    colnames(mtcars)[1] <- as.character(expression("P(X\u2264x)"))
    head(mtcars[,1:3])
    ##                   P(X≤x) cyl disp
    ## Mazda RX4           21.0   6  160
    ## Mazda RX4 Wag       21.0   6  160
    ## Datsun 710          22.8   4  108
    ## Hornet 4 Drive      21.4   6  258
    ## Hornet Sportabout   18.7   8  360
    ## Valiant             18.1   6  225
    

提交回复
热议问题