Re: [R] re moving parentheses/square brackets from data frame numbers

From: Charles C. Berry <cberry_at_tajo.ucsd.edu>
Date: Mon, 10 Mar 2008 09:27:27 -0700

On Mon, 10 Mar 2008, Thomsen wrote:

>
> Dear list,
>
> I am importing data consisting of numbers into dataframes. Some of the
> numbers are flanked by parentheses or square brackets. Thus, they are not
> recognized as numeric and the corresponding column is of class "factor"
> which makes it hard/impossible use in plotting functions.
>
> Is there a way to remove brackets from numbers in a column/row/dataframe?

Oh yes!

But you have not followed this dictum

          provide commented, minimal, self-contained, reproducible code

so we can't suggest specific solutions.

Suggest you see

 	?gsub
 	?regexp

HTH, Chuck

>
> Kind regards,
>
> Stefan
> --
> View this message in context: http://www.nabble.com/removing-parentheses-square-brackets-from-data-frame-numbers-tp15950774p15950774.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.
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry_at_tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901

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. Received on Mon 10 Mar 2008 - 16:30:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 10 Mar 2008 - 17:30:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive