[R] trouble with ifelse statement

2012-05-16 Thread Melissa Rosenkranz
Hello, I apologize in advance for not providing sample data, I'm a very new to R and can't easily generate appropriate sample data quickly. I'm hoping someone can offer advice without it. This code below works and does what I want it to do, which is for a given row in my dataframe, where the vari

[R] max value

2012-05-15 Thread Melissa Rosenkranz
Here is an R problem I am struggling with: My dataset is organized like this... subject sessionvariable_x variable_y 01 11 01 12 01 13 01 2

[R] using "factor" to eliminate unused levels without dropping other variables

2012-04-21 Thread Melissa Rosenkranz
Hello, I have been banging my head against the wall trying to figure out this seemingly simple problem with no success. I'm hoping that one or some of you can help. Here is the code I am trying to use: #importing data data.file <-read.csv("/file/location", header=TRUE, sep = ",") #selecting a su