[R] can we add raw data to data frame

2014-05-07 Thread Sandip Nandi
Hi , I want to add a serialized data to a data frame . The representation does not look good. > x<- c(1,2) > serialize(x,NULL) [1] 58 0a 00 00 00 02 00 03 00 02 00 02 03 00 00 00 00 0e 00 00 00 02 3f f0 00 [26] 00 00 00 00 00 40 00 00 00 00 00 00 00 > y<-serialize(x,NULL) > z=-1 > m<- data.frame(

Re: [R] Removing cell borders from svg or eps in levelplot

2014-02-06 Thread Soumyadeep Nandi
Hi Pascal, It worked! Thanks a lot :-) Soumyadeep From: skalp.oet...@gmail.com [skalp.oet...@gmail.com] On Behalf Of Pascal Oettli [kri...@ymail.com] Sent: Thursday, February 06, 2014 3:04 AM To: Soumyadeep Nandi Cc: r-help@r-project.org Subject: Re: [R

[R] xts conversion problem

2009-11-12 Thread Nandi
I have two data frames, with two columns each, the first being a Date variable. I would like to convert them to xts objects, indexed by the Date column. I would like to use as.Date and not as.POSIXct as the dateformat. The puzzling fact is that it works for the first one but not the other. Here is

Re: [R] Reading a data frame from R to excel

2009-09-15 Thread Nandi
",", col.names=T, row.names=F) Hope this helps. -Nandi On Sep 15, 4:58 am, filip rendel wrote: > Hello! I've generated multiple data frames that I wish to export to excel > using the function write.table. When I do so all the data is merged into a > single column i

Re: [R] Merge data frames but prefer values in on

2009-09-14 Thread Nandi
No you cannot. You may want to write a merge function with the special capability but there is no better way than the one suggested by Henrique. On Sep 14, 12:18 pm, JiHO wrote: > On 2009-September-11  , at 13:55 ,  wrote: > > > Maybe: > > > do.call(rbind, lapply(with(xy <- rbind(x, y), split(xy,

Re: [R] Order a vector and move to new vector

2009-09-10 Thread Nandi
1696 999.90 4 1696 999.88 6 1696 999.86 8 1696 999.84 10 1696 999.82 12 1696 999.75 14 1696 999.73 16 1696 999.71 18 1696 999.69 20 1696 999.67 22 1696 999.70 24 1696 1002.24 26 1696 1012.14 28 1696 1003.38 Not sure if this is what you were looking for. -Nandi On Sep 10, 4:06 am, C

Re: [R] Order of multiple plots

2009-09-10 Thread Nandi
mber 1. Hope this helps. -Nandi On Sep 9, 11:49 pm, legen wrote: > Hello all, > > I have a problem and need your help. > I am going to draw two plots in one row and two columns by using > “par(mfrow=c(1,2))”, but I want to first draw the right plot and then draw > the left plot.

Re: [R] randomForest.error: length of response must be the same as predictors

2008-07-03 Thread Soumyadeep Nandi
Gavin Simpson <[EMAIL PROTECTED]> wrote: > On Thu, 2008-07-03 at 12:11 +0530, Soumyadeep Nandi wrote: > > My data looks like: > > A,B,C,D,Class > > 1,2,0,2,cl1 > > 1,5,1,9,cl1 > > 3,2,1,2,cl2 > > 7,2,1,2,cl2 > > 2,2,1,2,cl2 > > 1,2,1,5,cl2 &

[R] randomForest.error: length of response must be the same as predictors

2008-07-02 Thread Soumyadeep Nandi
My data looks like: A,B,C,D,Class 1,2,0,2,cl1 1,5,1,9,cl1 3,2,1,2,cl2 7,2,1,2,cl2 2,2,1,2,cl2 1,2,1,5,cl2 0,2,1,2,cl2 4,2,1,2,cl2 3,5,1,2,cl2 3,2,12,3,cl2 3,2,4,2,cl2 **The steps followed are: trainfile <- read.csv("TrainFile",head=TRUE) datatrain <- subset(trainfile,select=c(-Class)) classtrain <

[R] randomForest training error

2008-07-02 Thread Soumyadeep Nandi
While trying to train randomForest with my dataset, I am ending up with the following error Error in randomForest.default(datatrain, classtrain) : length of response must be the same as predictors My data looks like: A,B,C,D,Class 1,2,1,2,cl1 1,2,1,2,cl1 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1

Re: [R] Trouble with FUN(newX[, i], ...)

2008-06-17 Thread Soumyadeep Nandi
Hi, I found the error. In my dataset there was some missing values those were blank. I have replaced the values with very small numeric values and it seems to be working. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Trouble with FUN(newX[, i], ...)

2008-06-17 Thread Soumyadeep Nandi
Hi, I am trying to train svm with some training data of about 4000 rows and 4000 columns. While running svm function I am ending up with the following error. trainfile <- read.csv('0_train_0016435.csv',head=TRUE,na.strings = "NULL") datatrain <- subset(trainfile,select=c(-Class)) model <- svm(d

Re: [R] training svm

2008-03-11 Thread Soumyadeep nandi
ience with using PCA myself. I have no experience with or knowledge about Singular Value Decomposition whatsoever, so I'm afraid I can't provide any insight into that. ~ Oldrich On Fri, Mar 7, 2008 at 9:48 AM, Soumyadeep nandi wrote: > Great, I too had the same problem of large siz

Re: [R] training svm

2008-03-06 Thread Soumyadeep nandi
ote: A rather technical workaround I see could be adding a row with a different value. But if a column only ever has one value, then it contributes nothing to the model and I see no reason why it would have to be kept. ~ Oldrich Kruza On Fri, Mar 7, 2008 at 6:45 AM, Soumyadeep nandi wrote: > What sh

Re: [R] training svm

2008-03-06 Thread Soumyadeep nandi
What should I do if I need to train svm() with data having same value across all rows in some columns. These must be the important features of the class and we cant exclude these columns to build up models. The error I am getting is: Error in predict.svm(ret, xhold) : Model is empty! In addition

[R] Problem training svm with columns having same values

2008-03-06 Thread Soumyadeep nandi
What should I do if I need to train svm() with data having same value across all rows in number of columns. These must be the deterministic features of the class and we cant exclude these columns to build model. The error I am getting is: Error in predict.svm(ret, xhold) : Model is empty! Is t

[R] Problem training svm with columns having same values

2008-03-06 Thread Soumyadeep nandi
What should I do if I need to train svm() with data having same value in number of columns. These must be the deterministic features for the class. Is there anyway to over come this trouble? Regards - [[alternative HTML version deleted]]