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.
If your csv file consists of either pipe/comma separated data then you can go with pipe/comma as delimiter else if it a combined of comma and pipes.
Adding "sep=;" or "sep=," to the CSV file Here are the steps you should follow: Open your CSV using a text editor. Skip a line at the top, and add sep=; if the separator used in the CSV is a semicolon (;), or sep=, if the separator is a comma (,). Save, and re-open the file.
Launch Microsoft Excel, go to File > Open > change “All Excel Files” (to the right of the “File name”) to “All Files,” and find the pipe-delimited file you have just downloaded. Hit “Open” and Excel's “Text Import Wizard” will launch.
We could use read.table to read *.psv file.
read.table("myfile.psv", sep = "|", header = FALSE, stringsAsFactors = FALSE)
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 "|"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With