Re: [R] value.labels

2011-08-12 Thread zcatav
Jim Lemon wrote: > > Hi Zeki, > > fgh<-read.table("fgh.tab",header=TRUE,sep="\t") > fgh$c<-add.value.labels(fgh$c,c("alive","dead","zombie")) > fgh$c > > Jim > Thanks Jim, This is what i want. Result as follows; > test2$c<-add.value.labels(test2$c,c("alive","dead","zombie")) > test2$c [1] 0

Re: [R] value.labels

2011-08-12 Thread zcatav
Jim Lemon wrote: > > On 08/12/2011 12:10 AM, zcatav wrote: >> Hello R people, >> >> I have a "data.frame". Status variable has 3 values. 0->alive, 1->dead >> and >> 2->missed >> Status as a factor have correct levels. Levels and labels

Re: [R] value.labels

2011-08-12 Thread zcatav
Hi, My data.frame as follows; a b c d 1 58009 2010-11-02 0 NA 2 114761 2011-07-28 1 2008-11-05 3 184440 2011-07-28 1 2009-12-08 4 189372 2011-07-28 0 NA 5 105286 NA

[R] value.labels

2011-08-11 Thread zcatav
Hello R people, I have a "data.frame". Status variable has 3 values. 0->alive, 1->dead and 2->missed Status as a factor have correct levels. Levels and labels output as follows; levels(Adbf$status); labels(Adbf$status) [1] "0" "1" "2" [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "1

Re: [R] conditional data replace (recode, change or whatsoever)

2011-08-03 Thread zcatav
David Winsemius wrote: > > On Aug 3, 2011, at 8:09 AM, zcatav wrote: > > You need to apply the same logical test/selection on the rows of the > RHS as you are doing on the LHS. > Possibly: > > X[ X[,"c"]==1, "b"] <

Re: [R] conditional data replace (recode, change or whatsoever)

2011-08-03 Thread zcatav
Gabor Grothendieck wrote: > > On Wed, Aug 3, 2011 at 8:09 AM, zcatav <zca...@gmail.com> wrote: >> Your suggestion works perfect as i pointed previous message. Now have >> another >> question about data editing. I try this code: >> X[X[,"c&quo

Re: [R] conditional data replace (recode, change or whatsoever)

2011-08-03 Thread zcatav
Your suggestion works perfect as i pointed previous message. Now have another question about data editing. I try this code: X[X[,"c"]==1,"b"]<-X[,"d"] and results with error: `[<-.data.frame`(`*tmp*`, X[, "c"] == 1, "b", value = c(NA, : replacement has 9 rows, data has 2 Logically i selected 2

Re: [R] Odp: conditional data replace (recode, change or whatsoever)

2011-08-03 Thread zcatav
Petr Pikal wrote: > > Hi > I believe there are better solutions but I would use two steps > > select rows where c==0 (see also FAQ 7.31) > sel<-which(big.data.frame$c==0) > > change NA values in b column based on sel > big.data.frame$b[sel][is.na(big.data.frame$b[sel])]<-"20011-07-28" > > Bewa

[R] conditional data replace (recode, change or whatsoever)

2011-08-03 Thread zcatav
Hello, I have a big data.frame, a piece of it as follows. a b c d 1 58009 2010-11-02 0 NA 2 114761 NA 1 2008-11-05 3 184440 NA 1 2009-12-08 4

[R] R on Android, at least on DOS

2011-07-23 Thread zcatav
Hello, Is there a version of R running on Android? I wonder R Project ported to Android. If this isn't, a DOS version may be helpfull to run on Android under dosbox. After a little googling i can't find a soluiton. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/R-on-Andro

Re: [R] Data values on graphics

2011-05-24 Thread zcatav
Yuta Tamberg wrote: > > > zcatav wrote: >> >> How can i add data values or proportion values on bar or pie charts? >> > You can add any text or numbers to any place of a graph with this command: >> text(45,20,"some text") > where: 45 is po