Friday, December 18, 2009

For the record

I've been making a lot of progress with the R statistical software package and programming environment over the last 6 weeks. The frustrating part about programming is that you always at some point come to what seems like it should be such a simple task and yet nothing works. I lost about 3 hours today to trying to remove some rows from a table. For the record, it appears I needed this:

u1=d10.s[!(d10.s$Condition=="badikiba.wav"&d10.s$ExpL=="3D"),]

Not:

u1=d10.s[(d10.s$Condition!="badikiba.wav"&d10.s$ExpL!="3D"),]

Nor:

u1=d10.s[-c(d10.s$Condition=="badikiba.wav"&d10.s$ExpL=="3D"),]

Nor:

u1=d10.s[-(d10.s$Condition=="badikiba.wav"&d10.s$ExpL=="3D"),]

Nor:

u1=d10.s[-()d10.s$Condition=="badikiba.wav"&d10.s$ExpL=="3D"),]

Nor:

u1=d10.s[d10.s$Condition=="digubati.wav",]$X
&
d10.s=d10.s[-u1,]

Now back to my life.

3 comments:

Sarah Laurenson said...

You're getting a peek into my life. They actually pay me to do that stuff.

Robin S. said...

Yuk. I get a headach just thinking about this, you all. Sorry, gotta go now...I feel an aspirin calling my name...

writtenwyrdd said...

I can't even proofread my typing, much less a string of code. If I were in your shoes, I'd resort to gasoline and a match, I'm afraid!