Re: [R] Formatting digits in a table with mix of numbers and characters

2012-11-08 Thread arun
quot; "--"    "NA"  #[3,] "--"    "123.5" "--"  A.K. - Original Message - From: David Winsemius To: Brian Hobbs Cc: r-help@r-project.org Sent: Thursday, November 8, 2012 12:40 PM Subject: Re: [R] Formatting digits in a table with mix of numbers

Re: [R] Formatting digits in a table with mix of numbers and characters

2012-11-08 Thread Marc Schwartz
On Nov 8, 2012, at 10:14 AM, Brian Hobbs wrote: > Hello, > > I am currently trying to find an easy way to take a table with a mix > of numbers and characters and format the numbers in the table to be > constrained to 4 significant digits. > > Example: > > #this is my table creation >> table <-

Re: [R] Formatting digits in a table with mix of numbers and characters

2012-11-08 Thread David Winsemius
On Nov 8, 2012, at 8:14 AM, Brian Hobbs wrote: > Hello, > > I am currently trying to find an easy way to take a table with a mix > of numbers and characters and format the numbers in the table to be > constrained to 4 significant digits. > > Example: > > #this is my table creation >> table <-

[R] Formatting digits in a table with mix of numbers and characters

2012-11-08 Thread Brian Hobbs
Hello, I am currently trying to find an easy way to take a table with a mix of numbers and characters and format the numbers in the table to be constrained to 4 significant digits. Example: #this is my table creation > table <- matrix(c(12.34567, "--", 10, 12.34567, "--", "NA", "--", 123.45678,