[R] Adding "%" symbol in middle Row

John Kane jrkrideau at inbox.com
Thu Jul 26 18:12:12 CEST 2012


Something as simple as dat1[2,2]  <-  "3%"  where your data is in a data.frame called dat will change 3 to 3%  it but it changes everything in that column to character if it was numeric.  
str(dat1)

John Kane
Kingston ON Canada


> -----Original Message-----
> From: saileshchowdary at gmail.com
> Sent: Wed, 25 Jul 2012 10:42:25 -0700 (PDT)
> To: r-help at r-project.org
> Subject: [R] Adding "%" symbol in middle Row
> 
> Hi Friends,
> 
> i have data   x             y            z
>                          aa          10         4
>                          bb%       3          2
>                          cc            4          3
> 
> I need to add "%" symbol  in  3rd row
> 
> x
> y            z
> 
> 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 at 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.

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!



More information about the R-help mailing list