Re: problems importing csv files

2014-11-03 Thread Karl Sinn
Hi, I tried to read your file into R and it worked with no errors but The data is absolutely not usable for any statistics. Sometimes I get values, sometimes labels and also the whole information about the coding is included in this csv file. For me this looks like a SPSS file in csv-forma

Re: problems importing csv files

2014-11-02 Thread Friedrich Beckmann
Hi Ben, you can remove the linebreaks inside the cells inside calc before exporting to csv. Use: Edit->Find&Replace Search for: \n Replace with: , Select: Other Option: Regular Expression Then you can export to csv with ; as delimiter I could import that file then directly. Friedrich Am 0

Re: problems importing csv files

2014-11-02 Thread Benjamin Oppermann
Hi Friedrich, The output of the grep command comes up empty. Either something is not working the way it should, or (more likely) I just keep getting your instructions wrong. I have no experience working with programming tools like Vi and regular expressions, so it's easy for me to get it all wrong

Re: problems importing csv files

2014-11-02 Thread Friedrich Beckmann
Hi Ben, in your case I would try to look at the file with vi or less. So I would do > cd > perl -p -e 's/\r\n/,/' ver47-interessantes.csv > a.csv Now look at the file with > vi a.csv In order to quit vi type ESC :q! The grep command expects the case data to start with „Teilnehmer“ at the

Re: problems importing csv files

2014-11-02 Thread Friedrich Beckmann
Hi, no, you only need to remove the variable description above the case data. Just try it. It is independent from the number of cases as the case data follows the variable description. Friedrich Am 02.11.2014 um 20:31 schrieb Benjamin Oppermann : > P.S. The "manual" approach with Vi would be a

Re: problems importing csv files

2014-11-02 Thread Benjamin Oppermann
P.S. The "manual" approach with Vi would be a great deal of work because we have over 350 cases, which would mean doing this procedure over 350 times, right? Am So, 2. Nov 2014, um 19:50, schrieb Friedrich Beckmann: > Hi Ben, > > thank you for the information. The commands I mention in

Re: problems importing csv files

2014-11-02 Thread Benjamin Oppermann
Hi Friedrich, It's not working. I used this exact command: perl -p -e 's/\r\n/,/' /media/Acer/Users/Benjamin/ownCloud/A-UNI/BA-Arbeit.SoSe2014/Daten/ver47-interessantes.csv > /home/ben/a.csv If I open the resulting file a.csv in Calc, it has only one line. Then instead I tried cd /media/Acer/Users

Re: problems importing csv files

2014-11-02 Thread Friedrich Beckmann
Hi Ben, thank you for the information. The commands I mention in the previous email are terminal commands. Your file is kind of difficult because it contains: a) two different character encodings (latin-1 and utf-8) for variable description and the actual data b) within the text elements insid

Re: problems importing csv files

2014-11-02 Thread Benjamin Oppermann
If you complete a survey that I designed for my thesis on this site: http://studentenforschung.de/ the results are gathered by the site in the form of these csv files. There is an alternative file that seems to be output to csv format in a different manner - the two are labelled "abc" and "012", bu

Re: problems importing csv files

2014-11-02 Thread Friedrich Beckmann
Hi Ben, can you tell me how you produced the original csv file? There is some discussion about the handling of CR and LF here: https://savannah.gnu.org/bugs/?40605 Friedrich ___ Pspp-users mailing list Pspp-users@gnu.org https://lists.gnu.org/mail

Re: problems importing csv files

2014-11-02 Thread Friedrich Beckmann
Hi Ben, you can do this second step also by hand with the editor „vi" > b) Only use the lines which start with „Teilnehmer“. That are the lines which > contain the variable data. You must delete the > variable descriptions because the descriptions have a different character > encoding. > > g

Re: problems importing csv files

2014-11-02 Thread Friedrich Beckmann
Hi Ben, > Thank you! If you deleted the variable description and removed the line > breaks before importing into PSPP, which program did you use for it? > How did you find the ? some look like line breaks in a text editor, > but aren't. Also I don't know how to find the variable descriptions in t

Re: problems importing csv files

2014-11-01 Thread Benjamin Oppermann
Hello Friedrich, Thank you! If you deleted the variable description and removed the line breaks before importing into PSPP, which program did you use for it? My text editor (Kate) will only open these files write protected, as the lines are too long. How did you find the ? some look like line brea