From: Mary Stevens <marystev@gmail.com>
Date: June 17, 2010 6:24:03 PM GMT+02:00
To: Jonathan Harrington <jmh@phonetik.uni-muenchen.de>
Subject: Re: Statistik in R course

Hi Jonathan,

I got all the errors out  and it opens fine in R (new mary2.txt attached). Stupid excel needs entries in the same column to be of equal length, so i just put underscores in). 

I've added a column for place, as you needed, but it would be great if you could do the speaker code in Column N. The speaker code is everything in the first cell after the word (eg bocca___) and the extra underscores. Specchietto tokens have an extra t or k at the end (e.g. specchiettoLTp1A02M_k    or    specchiettoLTp2A03R_t).

thanks so much fo rhtis

mary

¬

On 17/06/2010, at 4:30 PM, Jonathan Harrington wrote:

Hi Mary,

On Jun 17, 2010, at 1:40 PM, Mary Stevens wrote:

Hi Jonathan,
You have over 900 rows -- is each row really a different speaker (i.e. approx 900 different
speakers?).

Sorry, each row/observation is not a different speaker. There are 120 speakers, & each speaker read all of the 7 words. This gives a maximum of 8 observations per speaker although some were discarded. The speaker identity is in the filename which has the word (e.g. macchina, bocca, specchietto), then the code for the speaker which is taken from CLIPS (e.g. LTp1A02B, LTp2A04C). Sorry the labels are clunky, i wanted to keep them traceable back to CLIPS, but I can add a column with a  simpler code for speaker if this would make it easier.

Do you also have a list of the words from which these data were taken (i.e.
one per observation)?

I'm not sure I understand you exactly here. The list of words that the speakers read is bocca ‘mouth’, bottoni ‘buttons’, cappello ‘hat’, macchina ‘car’, occhi ‘eyes’, specchietto ‘little mirror’, and tetto ‘roof’. The leftmost column in my spreadsheet is unique for each observation. Does that help?
If you can do it, it would be helpful to 
put the speaker ID and the word ID in separate
columns.

Thus for the 1st 2 lines of data you
want in a new column O (word) cappello cappello
and in a new column P (speaker) LTp1A01B LTp1A01B
(if that's the speaker code). If you have
difficulty separating this, I can do it in R.

There are still a couple of problems reading 
the data in R. Firstly strip out the header
as I have done in mary.txt (attached) so that the file
begins with the first entry.

Next try and read the data in. So if mary.txt
is stored in pfad, then

p = read.table(paste(pfad, "mary.txt", sep="/"))

which gives an error:

Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
line 550 did not have 14 elements

One way to find the error is to force the data
to be filled to a square matrix with fill=T

p = read.table("/Volumes/Data_1/d/mary.txt", fill=T)

Then have a look at p around line 550 e.g.

p[548:555,]

and you'll see that there is a problem at 551
which gets entries of load of NA values (not applicable).

Then go back to the excel file, see if you can
spot the error, correct, it (or take out the line),  save it as a text file again, 
read it in again without the fill=T argument
and see if it works…. then repeat as above until it does.

And when it does, we have data we can test in R!

If you have any problems with this, get back to me.

Jonathan

<mary.txt>