Thanks Mark!
Mark Leeds wrote:
Hi Ricardo: you can look at ?regexpr but I'm pretty sure that below returns
a vector of TRUES and FALSES depending on whether the condition ( is Jalapa
contained in unidad ) is TRUE. So, wherever the vector is TRUE is where
Jalapa was contained in unidad. So,
Charles C. Berry wrote:
Like this:
conaguaMexicoSub - subset(conagua,
regexpr(Jalapa, as.character( unidad ) ) != -1
select = c(equipo,X101:X309))
But it looks like you have to sort out some issues concerning dueling
locales first.
Chuck
Far clear! Thanks! Now, if I
Mark Leeds wrote:
Hi Ricardo: I'm glad it helped but check
regexpr(Jalapa, as.character( unidad ) ) != -1
because I think it should be
regexpr(Jalapa, as.character( DF$unidad ) ) != -1
if unidad is a column of DF.
Checked! attach(DF) did the trick! :-)
Greetings,
Ricardo
--
Ricardo
Thanks all,
[EMAIL PROTECTED] wrote:
From: [Ricardo Rodriguez] Your XEN ICT Team [EMAIL PROTECTED]
Date: 2008/04/14 Mon PM 07:43:23 CDT
To: Henrique Dallazuanna [EMAIL PROTECTED], r-help@r-project.org
Subject: Re: [R] looking for a string
henrique means to use his command directly
Thanks Mark!
[EMAIL PROTECTED] wrote:
From: [Ricardo Rodriguez] Your XEN ICT Team [EMAIL PROTECTED]
Date: 2008/04/15 Tue PM 04:48:12 CDT
To: [EMAIL PROTECTED], r-help@r-project.org
Subject: Re: [R] looking for a string
Hi Ricardo: you can use the idea you
found below to apply
On Tue, 15 Apr 2008, [Ricardo Rodriguez] Your XEN ICT Team wrote:
Charles C. Berry wrote:
You want
?regexpr
Something like
regexpr(Jalapa, as.character( unidad ) ) != -1
HTH,
Chuck
Please, look at this...
substringJalapa - regexpr(Jalapa, as.character(conagua$unidad ) )
!= -1
Hi all,
I have not been able to find an answer to what is a simple question:
conaguaMexicoSub - subset(conagua, unidad == Jalapa, select =
c(equipo,X101:X309))
This subset gives me all the rows from conagua where unidad is Jalapa.
But, please, how do I get all the rows where unidad contents
On Tue, 15 Apr 2008, [Ricardo Rodriguez] Your XEN ICT Team wrote:
Hi all,
I have not been able to find an answer to what is a simple question:
conaguaMexicoSub - subset(conagua, unidad == Jalapa, select =
c(equipo,X101:X309))
This subset gives me all the rows from conagua where unidad is
Try something like this:
x[grep(Jalapa, x$unidad),, drop = F]
On Mon, Apr 14, 2008 at 9:10 PM, [Ricardo Rodriguez] Your XEN ICT Team
[EMAIL PROTECTED] wrote:
Hi all,
I have not been able to find an answer to what is a simple question:
conaguaMexicoSub - subset(conagua, unidad == Jalapa,
Thanks! Here what I get:
Henrique Dallazuanna wrote:
Try something like this:
x[grep(Jalapa, x$unidad),, drop = F]
conaguaMexicoSub - subset(conagua, unidad == x[grep(Jalapa,
x$unidad),, drop = F], select = c(equipo,X101:X309))
Error en x$unidad : $ operator is invalid for atomic vectors
Charles C. Berry wrote:
You want
?regexpr
Something like
regexpr(Jalapa, as.character( unidad ) ) != -1
HTH,
Chuck
Please, look at this...
substringJalapa - regexpr(Jalapa, as.character(conagua$unidad ) )
!= -1
Hubo 50 o más avisos (use warnings() para ver los primeros
11 matches
Mail list logo