excel数据导入一列
时间: 2023-10-04 18:10:27 浏览: 91
要将Excel数据导入一列,你可以使用R语言的readxl包和tidyverse包来完成。首先,你需要安装并加载这两个包。然后,使用read_excel函数导入Excel数据,并使用select函数只保留需要的一列数据。下面是一个示例代码:
```R
library(readxl)
library(tidyverse)
# 导入Excel数据并选择一列
orders <- read_excel("Weibo_2020Coron.xlsx") %>%
select("title")
```
上面的代码将导入名为"Weibo_2020Coron.xlsx"的Excel文件,并将其保存在名为orders的数据框中。数据框中只包含"title"列的数据。
阅读全文
相关推荐


















