Re: [R] subsetting levels of a vector

2012-08-10 Thread arun
nt: Friday, August 10, 2012 5:07 AM Subject: [R] subsetting levels of a vector Hi, I need to subset different levels of vector in a dataset to create a new dataframe that contains only these. These observations are not numerical, so I can't use the subset() function (at least this is t

Re: [R] subsetting levels of a vector

2012-08-10 Thread Marc Schwartz
On Aug 10, 2012, at 4:07 AM, simona mancini wrote: > Hi, > > > I need to subset different levels of vector in a dataset to create a new > dataframe that contains only these. These observations are not numerical, so > I can't use the subset() function (at least this is the response I get from

Re: [R] subsetting levels of a vector

2012-08-10 Thread John Kane
t1$Electrode == "F4") John Kane Kingston ON Canada > -Original Message- > From: mancinisim...@yahoo.it > Sent: Fri, 10 Aug 2012 10:07:31 +0100 (BST) > To: r-help@r-project.org > Subject: [R] subsetting levels of a vector > > Hi, > > > I need to su

Re: [R] subsetting levels of a vector

2012-08-10 Thread Rui Barradas
Hello, I don't see the problem. d <- read.table(text=" ParticipIDERP Electrode 1 s1 0.0370 FP1 2 s2 35.0654 FP2 3 s3 -3.3852F4 4 s4 2.6119P3 5 s5 0.1224P4 6 s6 -5.3153O1 ", header=TRUE) str(d) w

[R] subsetting levels of a vector

2012-08-10 Thread simona mancini
Hi, I need to subset different levels of vector in a dataset to create a new dataframe that contains only these. These observations are not numerical, so I can't use the subset() function (at least this is the response I get from R). Suppose the dataframe looks like this:   ParticipID    ERP