Home > Common Problem > body text

How to import excel data in R language

angryTom
Release: 2020-02-13 14:46:14
Original
39556 people have browsed it

How to import excel data in R language

R语言怎么导入excel数据

1、首先,导入R语言需要加载xlsx包,没有安装这个包的,请用下面的代码进行在线安装:

install.packages("xlsx")
Copy after login

2、安装好xlsx包后,接下来导入存放在“C:\Users\HWT\Desktop”路径下的“test.xlsx”文件,导入这个文件的代码如下:

library(xlsx)
read.xlsx2(file="C:\\Users\\HWT\\Desktop\\test.xlsx",sheetIndex=1)
Copy after login

How to import excel data in R language

How to import excel data in R language

更多R语言相关知识,请访问PHP中文网

The above is the detailed content of How to import excel data in R language. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!