[R] Coloring specific cells

2012-08-08 Thread namit
Hi , 


I have a data frame XYZ. i want to color the cells where ever we find G it
should be green,Y yellow,R redetc
and i want to send it from R to ppt.can any one help me on this. 




My data frame looks as below.

XYZ:

GY RTG Y RT 
AA   00 00 AA   1 1 11 
BB   00 00 BB   1 1 11 
CC   00 00 CC   1 1 11 
G   Y RT G Y R   T 
AA   2   2 22 AA3 3 3   3 
BB   2   2 22 BB3 3 3   3 
CC   2   2 22 CC3 3 3   3 


Thanks, 
Namit 



--
View this message in context: 
http://r.789695.n4.nabble.com/Coloring-specific-cells-tp4639578.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Can any one help me on this Issue

2012-08-08 Thread namit
Thanks Arunthis problem is resolved



--
View this message in context: 
http://r.789695.n4.nabble.com/Can-any-one-help-me-on-this-Issue-tp4638664p4639579.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Can any one help me on this Issue

2012-08-01 Thread namit
Hi Friends, 


I'm new to R ,I  have  a data frame Z16 which is genarated from another data
frame, and I want to add “%”  “$” in row  4 and 5 respectively. when I’m
trying using below logic, I’m getting warning message. I'm using R 2.14.2
Version
Can anyone  help me out on this. 

Note: Initially i used tranfrom function to do some calculations,where ever
it should give zero,its giving NaN,i used Replace function to replace NaN
with Zero(0)

Z16: 
SummaryG   YRT 
Accts   58264401226 
AcctCov 2301650395 
Cov%40 26  032 
UnCov%  60 74  068 
EqVol11$MM8.5   10.6019.1 

Using this logic: 

Z16[5,2:5]-paste($,Z16[5,2:5],sep=) 
Z16[3,2:5]-paste(Z16[3,2:5],%,sep=) 
Z16[4,2:5]-paste(Z16[4,2:5],%,sep=) 

Getting this Warning: In `[-.factor`(`*tmp*`, iseq, value = c(3L, 1L, 2L,
4L, NA)) 
invalid factor level, NAs
generate 


Final result: 

Summary   G Y R T 
Accts   582  644 01226 
AcctCov 230  165 0395 
Cov%40%  26%0%32% 
UnCov%  60%  74%   0%68% 
EqVol11$MM$8.50   $10.60 $0  $19.10 

Thanks in Advance.

Thanks,
Namit



--
View this message in context: 
http://r.789695.n4.nabble.com/Can-any-one-help-me-on-this-Issue-tp4638664.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Appending the column names

2012-07-30 Thread namit
Hi Freinds, 

I have two data frames X,Y. I want  to append both the data frames into one,
along with the columns names from both the data frames (it should look like
Z). 

X: 
SummaryG  Y R 
  Acc   1212   13 
  Bcc   1114   15 
  Ccc   1315   16 

Y: 
   SummaryG  Y R 
  Acc   1011   12 
  Bcc   1312   11 
  Ccc   1116   20 



Result 
-- 
Z: 

Summary G  Y R 
  Acc   1212   13 
  Bcc   1114   15 
  Ccc   1315   16 
Summary  G  Y R 
  Acc   1011   12 
  Bcc   1312   11 
  Ccc   1116   20 


Can anyone help me on this. 

Thanks in Advance. 

Thanks, 
Namit. 

Arun  your logic is not working,getting error message(could not find
functionColnames)



--
View this message in context: 
http://r.789695.n4.nabble.com/Appending-the-column-names-tp4638421.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Getting warning message

2012-07-30 Thread namit
Hi Arun,

when i'm using the logic which you mentionI'm getting error..can you
please help me on this.

 Z16-str(Z16)
'data.frame':   5 obs. of  5 variables:
 $ Summary: chr  Accts AcctCov Cov% UnCov% ...
 $ G  : Factor w/ 5 levels 224,39,568,..: 3 1 2 4 5
 $ Y  : Factor w/ 5 levels 10.6,158,25,..: 4 2 3 5 1
 $ R  : Factor w/ 1 level 0: 1 1 1 1 1
 $ T  : Factor w/ 5 levels 1196,19.1,..: 1 4 3 5 2
 Z16[5,2:5]-paste($,Z16[5,2:5],sep=)
Error in Z16[5, 2:5] - paste($, Z16[5, 2:5], sep = ) : 
  incorrect number of subscripts on matrix

Thanks in Advance.

Thanks,
Namit



--
View this message in context: 
http://r.789695.n4.nabble.com/Getting-warning-message-tp4637928p4638426.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Appending the Column names

2012-07-28 Thread namit
Hi Freinds,

I have two data frames X,Y. I want  to append both the data frames into one,
along with the columns names from both the data frames (it should look like
Z).

X:
SummaryG  Y R
  Acc   1212   13
  Bcc   1114   15
  Ccc   1315   16

Y:
   SummaryG  Y R
  Acc   1011   12
  Bcc   1312   11
  Ccc   1116   20



Result
--
Z:

Summary G  Y R
  Acc   1212   13
  Bcc   1114   15
  Ccc   1315   16
Summary  G  Y R
  Acc   1011   12
  Bcc   1312   11
  Ccc   1116   20


Can anyone help me on this.

Thanks in Advance.

Thanks,
Namit.



--
View this message in context: 
http://r.789695.n4.nabble.com/Appending-the-Column-names-tp4638207.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Arranging the data

2012-07-26 Thread namit
Hi Friends, 

Need help:I have data frame x   z y 
  ss  1   
2 
  aa 3   
0 
  cc  2   
5 

i need to  arrange  x column ,so that it should be in this form  x z
y 

   
aa   3 0 

   
ss1 2 

   
cc2 5 

Can anyone help me on this. 

Thanks in Advance 




--
View this message in context: 
http://r.789695.n4.nabble.com/Arranging-the-data-tp4637865.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Arranging the data

2012-07-26 Thread namit
Hi Arun,

Its the same question,but i need to arrange them i a perticular order
,,,which is not in desc or ascending  order.

Thanks,
Namit



--
View this message in context: 
http://r.789695.n4.nabble.com/Arranging-the-data-tp4637865p4637872.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Adding % symbol in middle Row

2012-07-26 Thread namit
Hi Friends,

i have data   x yz
 aa  10 4
 bb%   3  2
 cc4  3

I need to add % symbol  in  3rd row 
  x 
 
yz
aa  

10 4
bb% 
 
3%   2%
cc  
 
4   3

can anyone help me on this.


Thanks in Advance.

Thanks,
Sailesh















--
View this message in context: 
http://r.789695.n4.nabble.com/Adding-symbol-in-middle-Row-tp4637817.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Getting warning message

2012-07-26 Thread namit
Hi Friends,


I  have  a data frame X, and I want to add “%”  “$” in row  4 and 5
respectively. when I’m trying using below logic, I’m getting warning
message.
Can anyone  help me out on this.


X:
Summary   G Y   R   T
Accts582644 0   1226
AcctCov  230165 0   395
Cov%  4026  0   32
UnCov%   60 74  0   68
EqVol11$MM8.5   10.60   19.1

Using this logic: 

Z16[5,2:5]-paste($,Z16[5,2:5],sep=)
Z16[3,2:5]-paste(Z16[3,2:5],%,sep=)
Z16[4,2:5]-paste(Z16[4,2:5],%,sep=)

Getting this Warning: In `[-.factor`(`*tmp*`, iseq, value = c(3L, 1L, 2L,
4L, NA))
invalid factor level, NAs
generate


Final result:

Summary   G Y   R   T
Accts   582 644 0   1226
AcctCov 230 165 0   395
Cov%40% 26% 0%  32%
UnCov%  60% 74% 0%  68%
EqVol11$MM$8.50 $10.60  $0  $19.10 


Thanks in Advance.

Thanks,
Namit




--
View this message in context: 
http://r.789695.n4.nabble.com/Getting-warning-message-tp4637928.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Getting warning message

2012-07-26 Thread namit
Hi Arun,

Bymistake it kept X instead of Z16.



--
View this message in context: 
http://r.789695.n4.nabble.com/Getting-warning-message-tp4637928p4637983.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] creating Pivot

2012-07-25 Thread namit
Hi Friends, 
  

I'm new to R.I  have a data frame : 

xxx  having  columns  colorname  values 
  R  XXX 10 
  G  YYY  4 
  Y   ZZZ  5 
  G  XXX 2 
Y XXX 3 
   R  YYY  2 
   Y  YYY   1 
   R ZZZ   2 
   G ZZZ   3 


Now i want to have the data  in this format   RGY 


  
XX X   10   2 3 


YYY 24 1 

   
ZZZ  2   3  5 

Can you please help me on this. 


Thanks, 
Namit 





--
View this message in context: 
http://r.789695.n4.nabble.com/creating-Pivot-tp4637711.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Create a Pivot

2012-07-24 Thread namit
Hi Friends,

i'm new to RI have data frame  having columns  X Y ZI want to do
pivot on this data framecan any one help me on this...

Thanks,
Namit



--
View this message in context: 
http://r.789695.n4.nabble.com/Create-a-Pivot-tp4637629.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Random Forest Partial Dependence Plot

2012-06-21 Thread Namit Setia
I'm using the partial plot function in the Random Forest package
(randomForest).

I want to be able to control the region of values it chooses for the x.var
variable (instead of going from 0 to 10, I want to go from 0 to 1000).

The problem I'm having is that it seems the only method to do that is to
change xlim.  I could use xlim and n.pt, like:

partialPlot(rf,x.var=myvar,pred.data=rfdata,xlim=c(0,1000),n.pt=100)

The problem with using xlim, however, is that it only seems to change the
x-axis after doing the calculations.  In order to get any meaningful graph
of the data for such a small portion of the entire x.var region, I'd have
to increase the density of points plotted by a lot (n.pt).

Because partial plot is an intensive/slow process, this isn't really a
viable solution (takes minutes to create a partial plot already).

Any suggestion?  (besides using plotmo)

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.