R:字符大小写转换

R:字符大小写转换

>x = “CAGGGT”
#定义字符串变量x
>tolower(x)
[1] “caggt”
#将x中的字符全部转换为小写字母
>y = tolower(x)
>y
[1] “cagggt”
>toupper(y)
[1] “CAGGGT”
#将y中的字符全部转换为大写字母
>library(Hmisc)
>capitalize(y)
[1] “Cagggt”
#将y的首字母转换成大写字母

如若转载,请注明出处:https://www.ouq.net/ruppertolower.html

(0)
打赏 微信打赏,为服务器增加100M流量 微信打赏,为服务器增加100M流量 支付宝打赏,为服务器增加100M流量 支付宝打赏,为服务器增加100M流量
上一篇 2021年7月15日 下午4:48
下一篇 2021年8月29日 下午10:38

相关推荐

  • 在R中安装Git/Github

    1.查看是否安装Git命令: 执行安装命令: which git ## /usr/bin/git 查看 git –version 版本: git –version ## git…

    R 2022年3月5日
  • R:Bioconductor设置国内镜像

    Bioconductor安装包出现无法打开url https://bioconductor.org/install/,可以通过修改国内镜像解决,代码如下: 运行安装命令 BiocM…

    2021年1月9日
  • 利用R读取h5ad文件

    安装包 install.packages(“remotes”)remotes::install_github(“mojaveazure/seur…

    R 2022年5月13日
  • edgeR:RNAseq差异基因比较

    Empirical analysis of digital gene expression data in R 安装: source(“http://bioconduc…

    2020年8月14日
  • 2022年1月 精选最新R包

    Agriculture ALUES v0.2.0: Provides functions for fuzzy modeling to evaluate land suitabili…

    2022年3月5日