简体   繁体   English

如何正确读取R中的一个csv文件

[英]How to read a csv file in R appropriately

I have problem reading the.csv file as below in R appropriately.我在正确读取 R 中的 .csv 文件时遇到问题。 Anyone knows the efficient way?任何人都知道有效的方法? You may download the csv file from the link (in the link https://gtexportal.org/home/gene/ ).您可以从链接(在链接https://gtexportal.org/home/gene/ 中)下载 csv 文件。 You need to click on the csv to download it.需要点击csv下载。

using the:使用:

data<-read.csv('GTExPortal.csv',sep=","), read the data in one column. data<-read.csv('GTExPortal.csv',sep=","),读取一列数据。

Try this尝试这个


library(haven)
data<-read.csv('your path',sep=",")

or或者

library(tidyverse)
library(readr)
data<-read_csv('your path')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM