读取 PSV(管道分隔)文件或字符串 [英] Reading PSV (pipe-separated) file or string

查看:26
本文介绍了读取 PSV(管道分隔)文件或字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚收到一个数据文件,其扩展名为*.psv".研究了一下,不知道怎么打开R.

I have just received a data file, whose extension is "*.psv". After doing a bit of research, I don't know how to open it R.

推荐答案

我们可以使用 read.table 来读取 *.psv 文件.

We could use read.table to read *.psv file.

read.table("myfile.psv", sep = "|", header = FALSE, stringsAsFactors = FALSE)

psv 文件可能有很多不同的表现形式,但是说到数据挖掘,我想可能更多的是管道分离";文件.文件中的数据用|"分隔

There might be many different representations of psv file, but when it comes to data mining, I think it might be more about "pipe separated" file. The data in the file is separated by "|"

这篇关于读取 PSV(管道分隔)文件或字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆