
R相关
文章平均质量分 54
XH生信ML笔记
无计算机背景的生信入坑者一枚,生物狗一只,读博时初涉linux,以后陆续入坑python,r,Machine Learning,Deep Learning。主页主要是备份代码,如果能帮助到其他朋友就更好。
展开
-
CIBERSORT出现“$ operator is invalid for atomic vectors” 报错
最近用cybersort 分析细胞出现“$ operator is invalid for atomic vectors"错误,快放弃时,看到一个。说是缺少e1071包,安装以后,报错解决。安装e1071包后运行正常。原创 2023-05-23 13:20:46 · 26412 阅读 · 2 评论 -
解除R中从github上下载包API限制的问题(Error: Failed to install ‘unknown package‘ from GitHub: HTTP error 403. )
githhub消除api_rate 限制,安装ggforestplot包原创 2021-12-19 13:05:13 · 59945 阅读 · 18 评论 -
基因芯片GEO数据分析流程-limma
最近工作关系,需要重现一个文章的基因芯片数据分析,查找差异基因,花了一天时间跑了limma流程,供大家参考。论文名字为 Identification of inflammatory mediators in patients with Crohn’s disease unresponsive to anti-TNFα therapy, 是三组之间的差异基因比较。想复现这个图:我图省事,直接GEO数据库中下载了基因表达量的矩阵文件GSE52746_series_matrix.txt.gz, 直接从mat原创 2021-04-22 14:07:29 · 4903 阅读 · 1 评论 -
如何使用ggplot画条形图并调整背景
以前都是python中matplotlib画图,自从学会R后,用R画图更合适# 读取数据和查询数据taxon <- read.table("top_genus.txt")acc <- read.table("top_genus_acc.txt")# 导入库library("ggplot2")# 构建数据框用来画图data <- data.frame(taxon=...原创 2020-04-10 16:14:50 · 2352 阅读 · 0 评论 -
R 中Salaries数据集找不到的原因
从car 包中导入R中Salaries数据集时发现不存在:> data(Salaries, package="car")Warning message:In data(Salaries, package = "car") : data set ‘Salaries’ not found原来是Salaries 数据转移到carData包中了,重新导入即可> data(Salar...原创 2020-02-26 12:00:35 · 4878 阅读 · 1 评论 -
R中如何下载pima-indians-diabetes数据库
在练习《R语言实战》一树的”分类“这张要用到pima-indians-diabetes 数据库,但原书中的连接已经失效,因此重新在网上找了一个链接地址,只需一下代码即可下载:url <- "http://nrvis.com/data/mldata/pima-indians-diabetes.csv"diabetes <- read.table(url, sep=",", head...原创 2020-02-16 10:55:52 · 1558 阅读 · 1 评论 -
R 中 requires numeric/complex matrix/vector arguments 错误
在做矩阵的内积计算时(%*%),出现“requires numeric/complex matrix/vector arguments”错误:出现错误的代码:> a <- cbind(1,x)> b <- fit$coefficients> > dim(a)[1] 50 5> b (Intercept) Population ...原创 2020-01-27 07:47:54 · 11757 阅读 · 0 评论