Skip to content
Back to formatted view

Raw Message

Message-ID: <20090327102025.3a5aa90e@mgf.econ.gu.se>
Date: 2009-03-27T09:20:25Z
From: Florin Maican
Subject: A beginner's question
In-Reply-To: <060613a5-e33c-4777-8f7e-0d7706a99d38@q30g2000prq.googlegroups.com>

You can do like this:

1.
    mydata[mydata$skill==1,]

2. 
   mydata[mydata[,"skill"]==1,]
  
/Forin


On Thu, 26 Mar 2009 23:40:32 -0700 (PDT)
minben <minbenh at gmail.com> wrote:

> I am a new R-language user. I have set up a data frame "mydata",one of
> the colume of which is "skill". Now I want to select the observations
> whose "skill" value is equal to 1,by what command can I get it?
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html and provide commented,
> minimal, self-contained, reproducible code.
> 


-- 
         Florin G. Maican            
==================================

Ph.D. candidate,                    
Department of Economics,
School of Business, Economics and Law,             
Gothenburg University, Sweden       
-----------------------------------
    P.O. Box 640 SE-405 30,         
    Gothenburg, Sweden              

 Mobil:  +46 76 235 3039             
 Phone:  +46 31 786 4866             
 Fax:    +46 31 786 4154              
 Home Page: http://maicanfg.googlepages.com/index.html
 E-mail: florin.maican at handels.gu.se 
------------------------------------
 "Not everything that counts can be 
 counted, and not everything that can be 
 counted counts."
                         --- Einstein ---