R记录

字符

1.getwd setwd
2.rm(list=ls())
3.ESC停止运行
3.n() n_distinct() 计数 不重复计数
5.View(top_counts) 看表格
6.mpg是dataframe str(mpg)看大致结构
7.快速输出<- option+-
8.packageversion 查看包版本
9.ctrl shift c 多行注释

错误:
1.unused arguments错误:其实是把参数拼写错了
stringsAsFactors (string+s)
2.同样错误 ?函数发现确实两个参数没有。发现包的版本太低了。
3.安装包失败
tar: Failed to set default locale
Use this command in the R console:
system("defaults write org.R-project.R force.LANG en_US.UTF-8")
Remember to quit and start again R.
4.unable to find an inherited method for function ‘select’ for signature ‘"tbl_df"’
dplyr::select

1.R语言 函数
2.批量脚本
3.ggplot的theme中的标签 图例修改
4.mac添加路径:注意在 ~/.bash_profile

导入的dataframe需要转化成charactor 向量

rownames(mrnaList) <- mrnaList$Gene
Error in row.names<-.data.frame(*tmp*, value = value) :
duplicate 'row.names' are not allowed

因为变量有重复的。所以不能作为rowname

rownames(mrnaList) = make.names(mrnaList$mRNA, unique=TRUE)

rstudio
ctrl+1 ctrl+2

packageVersion 查看软件包的版本

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容