Re: [R] Beginer data.frame

2010-01-12 Thread Gabor Grothendieck
See help(grepl) so using built in data frame CO2 this gets rows whose Plant column start with Qn: subset(CO2, grepl("^Qn", Plant)) On Tue, Jan 12, 2010 at 6:17 AM, Jean-Baptiste Combes wrote: > Hello, > > I use R 2.10, and I am new in R (I used to use SAS and lately Stata), I am > using XP. > >

Re: [R] Beginer data.frame

2010-01-12 Thread David Winsemius
On Jan 12, 2010, at 6:17 AM, Jean-Baptiste Combes wrote: Hello, I use R 2.10, and I am new in R (I used to use SAS and lately Stata), I am using XP. I have a data which has a data.frame format called x.df (read from a csv file). I want to take from this data observations for which the

Re: [R] Beginer data.frame

2010-01-12 Thread K. Elo
Hi! Jean-Baptiste Combes wrote: > Hello, > > I use R 2.10, and I am new in R (I used to use SAS and lately Stata), I am > using XP. > > I have a data which has a data.frame format called x.df (read from a csv > file). I want to take from this data observations for which the variable > "Code" sta

Re: [R] Beginer data.frame

2010-01-12 Thread Stephan Kolassa
Hi Jean-Baptiste, two points: 1) Your variable "df" is a *local* variable which you define in your function myfunc(), so it is not known outside myfunc(). When you ask is.data.frame(df), R looks at the global definition of df - which is the density function of the F distribution. To make your

[R] Beginer data.frame

2010-01-12 Thread Jean-Baptiste Combes
Hello, I use R 2.10, and I am new in R (I used to use SAS and lately Stata), I am using XP. I have a data which has a data.frame format called x.df (read from a csv file). I want to take from this data observations for which the variable "Code" starts with an "R". I took all the Code and put them