方法一:安装xlsx包
install.packages("xlsx")
library(xlsx)
#取出excel(2020-11-29zlin_IL33_TGFb1.xls)工作簿的工作表Results,存为.csv
results = read.xlsx(file = "2020-11-29zlin_IL33_TGFb1.xls","Results",
startRow = 38,endRow = 135,header = TRUE)
方法二:提示你的电脑没安装java,可以安装提示访问java官网安装,或者从另外一个包“readxl”读取
library(readxl)
rea = read_excel("2020-12-13zlin_qPCR_18S-TNFa.xls","Results")
# read_excel没有header参数
?read_excel查看用法,如下
read_excel(path, sheet = NULL, range = NULL, col_names = TRUE,
col_types = NULL, na = "", trim_ws = TRUE, skip = 0,
n_max = Inf, guess_max = min(1000, n_max),
progress = readxl_progress(), .name_repair = "unique")
read_xls(path, sheet = NULL, range = NULL, col_names = TRUE,
col_types = NULL, na = "", trim_ws = TRUE, skip = 0,
n_max = Inf, guess_max = min(1000, n_max),
progress = readxl_progress(), .name_repair = "unique")
read_xlsx(path, sheet = NULL, range = NULL, col_names = TRUE,
col_types = NULL, na = "", trim_ws = TRUE, skip = 0,
n_max = Inf, guess_max = min(1000, n_max),
progress = readxl_progress(), .name_repair = "unique")
方法三:安装了包以后,是在不懂代码,还可以这样读取,前提是安装了包
出现以下界面
接着
成功的界面