I tried to download a file from LSData, but it brings me to a page full of weird characters. The first few are:
7z¼¯'�DÙ™µUa�����b�������’³_èÚ†à]�&Jgl›Ü)ÉZKŒP7þò|¤ˆëÁëxŠ§u6²ã]’“Àé3lGê7ñ"!èÞ’ïjP³
l½Öv<¹-žøZ¹Æ âäùëOKä#;cÞ Žmï•&?^¢Ø"Á.=ù‚u|õ9žG<އ趽ÈËŒøÂtŠÍÝê/ÂG×à×–R§Ýj×zÛ¥™éwG—ï‘ývíõåò ÂÑ\‡W�ܱò§úßxlø¾Ö¾EºáPnÚR"økv§}6“SLÒ¢ø€m]-Ì«gÐáÅMŠWGU�µOÿDõ™}u¦HŠ_qŠ,/¦lÔ}Áô|,Òäêÿ2l«ª»°úö¡]+€™´í¿¢«|Ãw#êñ:t!
I have no clue what I'm looking at. How can I convert this entire page into a CSV, or in whatever file so I can use it in R?
it is a 7z zipped file, you can download and unzip it to get the CSV file
Related
I have a zipped sas file and there are couple sas files inside that. Just want to know if there is a chance that I can use read_sas function to read specific file under that zipped file? Couldn't find anything online about that.
Checked the ?read_sas nothing mentioned about that.
code I used :
# zipped file name: example.zip
# files inside example.zip file are file1.sas7bdat, file2.sas7bdat and targetfilename.sas7bdat
file <- read_sas(example.zip, 'targetfilename.sas7bdat')
outcome: read_sas only read the first file inside that zipped file.
Sorted solution:
read_sas(unz("examp;e.zip", "'targetfilename.sas7bdat'"))
solved:
read_sas(unz("examp;e.zip", "'targetfilename.sas7bdat'"))
I wish to open and read the following text file in Scilab (version 6.0.2).
The original file is an .xlsx that I have converted to both .txt and .csv through Excel to facilitate opening & working with it in Scilab.
Using both fscanfMat and csvRead, scilab only reads the first column as Nan. I understand why the first column is considered as Nan, but I do not see why the rest of the document isn't read. Columns 2 and 3 are in particular of interest to me.
For csvRead, I used :
M=csvRead(chemin+filename," ",",",[],[],[],[],7);
to skip the 7-row header.
Could it be something to do with the way in which the file has been formatted?
For anyone able to help, I will try to upload an example of a .txt file and also the original .xlsx file
Files available for download, here: Excel and Text files
If you convert your xlsx file into a xls one with Excel you can read it withthe readxls function.
Your separator is a tabulation character (ascii code 9). Use the following command:
M=csvRead("Probe1_350N_2S.txt",ascii(9),",",[],[],[],[],7);
I'm exporting CSV files from R, using write.csv
I've also tried various encoding options.
The CSV files open fine and read manually.
However, I need to process these files in another program (METAL https://genome.sph.umich.edu/wiki/METAL) and the program is pretty much unable to recognize the text in the files.
But, when I open the CSV files in excel, and save them again manually with excel-- same name, same place, same encoding, without changing anything except clicking save as CSV, then METAL is able to recognize the text in the CSV files.
I was wondering if anyone has any suggestions how to fix this? It's very cumbersome to go in each file and have to re-save manually.
I tried to download csv file from http://census.ire.org/data/bulkdata.html
I tried this code:
download.file("http://censusdata.ire.org/09/all_060_in_09.PCT7.csv")
It's works, but I have a csv file made of symbols and not numbers. I can read it from R console, but some files have wrong numbers of column.
Why?
TY
I have two pdf files and two text files which are converted into ebcdif format. The two text files acts like cover files for the pdf files containing details like pdf name, number of pages, etc. in a fixed format.
Cover1.det, Firstpdf.pdf, Cover2.det, Secondpdf.pdf
Format of the cover file could be:
Firstpdf.pdf|22|03/31/2012
that is
pdfname|page num|date generated
which is then converted into ebcdic format.
I want to merge all these files in a single file in the order first text file, first pdf file, second text file, second pdf file.
The idea is to then push this single merged file into mainframes using scp.
1) How to merge above mentioned four files into a single file?
2) Do I need to convert pdf files also in ebcdic format ? If yes, how ?
3) As far as I know, mainframe files also need record length details during transit. How to find out record length of the file if at all I succeed in merging them in a single file ?
I remember reading somewhere that it could be done using put and append in ftp. However since I have to use scp, I am not sure how to achieve this merging.
Thanks for reading.
1) Why not use something like pkzip?
2) I don't think converting the pdf files to ebcdic is necessary or even possible. The files need to be transfered in Binary mode
3) Using pkzip and scp you will not need the record length
File merging could easily be achieved by using Cat command in unix with > and >> append operators.
Also, if the next file should start from a new line (as was my case) a blank echo could be inserted between files.