Re: [R] how to replace values

2014-01-21 Thread kingsly
First of all I thank all the friends. Though I  have written zero to replace NA in  previous email, I will replace with extreme value (9). On Tuesday, 21 January 2014 7:05 AM, jwd [via R] wrote: On Sun, 19 Jan 2014 11:39:43 -0800 (PST) kingsly <[hidden email]>

[R] how to replace values

2014-01-19 Thread kingsly
Dear R community   I have a large data set contain some empty cells. Because of that,  may be I am wrong, values are produced. Now I want replace both empty and values with zero.   Elder1 <- data.frame(   ID=c("ID1","ID2","ID3","ID6","ID8"),   age=c(38,35,"",NA,NA)) Output I am expecting Â

Re: [R] Doubt in simple merge

2014-01-16 Thread kingsly
Thank you dear friends.  You have cleared my first doubt.   My second doubt: I have the same data sets "Elder" and "Younger". Elder <- data.frame(   ID=c("ID1","ID2","ID3"),   age=c(38,35,31)) Younger <- data.frame(   ID=c("ID4","ID5","ID3"),   age=c(29,21,"NA"))  Row ID3 comes in both

[R] Doubt in simple merge

2014-01-16 Thread kingsly
Dear R community I have a two data set called "Elder" and "Younger". This is my code for simple merge. Elder <- data.frame(   ID=c("ID1","ID2","ID3"),   age=c(38,35,31)) Younger <- data.frame(   ID=c("ID4","ID5","ID3"),   age=c(29,21,31)) mer <- merge(Elder,Younger,by="ID", all=T) Output

Re: [R] How to evaluate sequence of strings like this

2013-12-08 Thread kingsly
mydat$Centercode, mydat$FSUSN,mydat$Round,sep="")  mydat2 <- as.character(interaction(mydat,sep=""))  identical(mydat1,mydat2) #[1] TRUE #or mydat3 <- do.call(paste0,mydat) identical(mydat1,mydat2) #[1] TRUE A.K. On Sunday, December 8, 2013 8:58 AM, kingsly <[

[R] How to evaluate sequence of strings like this

2013-12-08 Thread kingsly
Hello Dear R community,  This is my problem.  I have a data set (dataframe) called "mydat". It consist of 3 numerical variable.  They are Centrecode, FSUSN and Round. I want to create unique ID by combining these 3 variables. Follwing commands gives me what I need. mydat1 <- paste(mydat$Cen

Re: [R] How to start R in maximized size???

2012-03-17 Thread kingsly
I think what ever I say applicable to window (operating system).  Start "R", In "Rgui" menu, click open "edit", you will find "GUI preference", clik open it. You will find "Rgui configuration editor". According to  ur wish, change the columns to around "90" (it is a small exercise).  Then

Re: [R] cryptic error message: "Error in embed(y, lag) : wrong embedding dimension"

2012-01-27 Thread kingsly
According to the source code of embed function, it will stop work if dimention is <1 or >n . Part of the embed source code is mention below for your reference. if ((dimension < 1) | (dimension > n)) stop ("wrong embedding dimension") I have also give the link of the source file of emb