解决:R读取含中文excel文件,read.xlsx乱码问题
1.新建testexcel.xlsx文件

2.创建R文件:test.R
# 定义文件变量 excel_path <- "chapter2/testexcel.xlsx" # 读取文件 info <- read.xlsx(excel_path, 1, encoding = "UTF-8") # 打印文件信息 print(info)
3.运行截图

1.新建testexcel.xlsx文件

2.创建R文件:test.R
# 定义文件变量 excel_path <- "chapter2/testexcel.xlsx" # 读取文件 info <- read.xlsx(excel_path, 1, encoding = "UTF-8") # 打印文件信息 print(info)
3.运行截图

