Displaying 20 results from an estimated 10000 matches similar to: "Formatting significant digits with trailing zeros"
2008 Jun 02
6
significant digits (PR#9682)
I came to report this same bug and found it already in the trash, but
I slightly disagree with that assessment. If it's not a bug, then
perhaps it's a feature request. Comments at the end.
On Mon, May 14, 2007, Duncan Murdoch wrote:
>>On 13/05/2007 8:46 PM, scott.wilkinson at csiro.au wrote:
>>
>> In the example below round() does not report to the specified number of
2009 Nov 10
1
2 significant digits
Hi,
How to represent a rounded number ending with 0 with 2-significant digits? If I have for ex, 0.8031 and I use signif or round with digits = 2, I'll get 0.8. If I use format, I get character type (even if I pass number as parameter) and if I convert with as.numeric, I'll lose one significant digit (0):
> format(13.7, nsmall = 2)
[1] "13.70"
> as.numeric( format(13.7,
2005 May 30
1
Formatting numbers with a limited amount of digits consistently
I have tried to get signif, round and format to display numbers like
these consistently in a table, using e.g. signif(x,digits=3)
17.01
18.15
I want
17.0
18.2
Not
17
18.2
Why is the last digit stripped off in the case when it is zero!
Is this a "feature" of R or did I miss something?
---------------------------------------------
Henrik Andersson
Netherlands Institute of
2012 Nov 08
2
Formatting digits in a table with mix of numbers and characters
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, "--"), ncol = 3, byrow=TRUE)
>
> table
2011 Feb 02
1
Significant codes in mtable
Hi all,
Does anyone know a way to change the significant stars in mtable (package memisc)? The default is
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1,
however I need it to be
Signif. codes: 0 '***' 0.01 '**' 0.05 '*' 0.1 ' ' 1
Kind regards,
Erich
[[alternative HTML version deleted]]
2013 Apr 17
1
mgcv: how select significant predictor vars when using gam(...select=TRUE) using automatic optimization
I have 11 possible predictor variables and use them to model quite a few
target variables.
In search for a consistent manner and possibly non-manual manner to identify
the significant predictor vars out of the eleven I thought the option
"select=T" might do.
Example: (here only 4 pedictors)
first is vanilla with "select=F"
>
2007 May 14
1
round(#, digits=x) unreliable for x=2 (PR#9682)
Full_Name: Scott Wilkinson
Version: 2.3.1
OS: WinXP Pro
Submission from: (NULL) (140.253.203.4)
In the example below round() does not report to the specified number of digits
when the last digit to be reported is zero: Compare behaviour for 0.897575 and
0.946251. Ditto for signif(). The number of sigfigs is ambiguous unless the
reader knows this behaviour. Is this a bug or intended behaviour? Is
2009 Apr 23
1
how to control significant digits(?) on axis labels
Dear R mailing list
I would like some help on how to get R to display the same number of significant digits (?) for *all* tick marks on axis labels (yet be flexible enough to handle different data sets that vary by 10-1000X).
Consider this simple example:
#---------------------------#
x <- seq(0,2,by=0.5)
xlim <- range(pretty(x,n=5))
ylim <- xlim
2010 May 20
2
Trailing zero's missing from signif function ?
Hello.
In my opinion the function
signif(1.4,digits=3)
should give 1.40
but actually gives 1.4. Is there a magic way to add the trailing digits
back (and converting to chracter at the same time ?)
Regards,
Paul.
2004 Nov 20
3
How to change the significant codes default?
Dear R experts,
I am posting this question on behalf of a Japanese R user
who wants to know how to change the siginificant codes default.
As you know, R's default significant codes are:
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
But he says that it is usual in economics to give codes such as
`***' for 0.01, `**' for 0.05 and `*' for
2010 Feb 17
2
extract the data that match
Hi r-users,
I would like to extract the data that match. Attached is my data:
I'm interested in matchind the value in column 'intg' with value in column 'rand_no'
> cbind(z=z,intg=dd,rand_no = rr)
z intg rand_no
[1,] 0.00 0.000 0.001
[2,] 0.01 0.000 0.002
[3,] 0.02 0.000 0.002
[4,] 0.03 0.000 0.003
[5,] 0.04 0.000 0.003
[6,]
2011 Jan 23
2
Problem with combined two data frame.
Dear All.
I have some problem with combined two data frame.
....
I have first data frame ..
GPAX THAI MATH SCINCE SOCIAL HEALT ART CAREER LANGUAGE
1227 2.99 3.32 2.50 2.64 3.05 3.60 3.72 3.57 2.62
1704 2.81 2.56 2.48 2.86 3.22 3.19 3.55 3.20 2.51
617 2.18 1.90 1.97 2.06 2.38 3.50 3.54 2.33 1.70
876 2.82 3.14 2.73 2.46 2.71 3.11 3.04 3.24 2.90
2012 Jun 05
1
nls: how do you know if the model is significant?
Hi all,
I'm struggling with nls. How do you know if your model is significant? For a
lm, you get a p-value, but you don't get it for a nls. Is there a way to
calculate it?
For a lm I use this:
a<-summary(lm(model ~obs))
f.stat<-a$fstatistic
p.value<-1-pf(f.stat["value"],f.stat["numdf"],f.stat["dendf"])
Is there something similar for a nls?
2008 May 14
1
howto get significant digits for round()
i have a table like this of an value and its tolerance
length delta-length
12.2232 0.4
123.422 0.034123
1234 12
i want to round the value to the significant digits in this way:
my-round(length,delta-length)
12.2 , 0.4
123.42 , 0.03
1234 , 12
how can i do this with R?
please CC to email,
thanks so far,
--
Jonas Stein <news at jonasstein.de>
2005 Apr 21
1
printCoefmat(signif.legend =FALSE) (PR#7802)
printCoefmat(signif.legend =FALSE) does not work properly. The option
"signif.legend = FALSE" is ignored as shown in the example below.
cmat <- cbind(rnorm(3, 10), sqrt(rchisq(3, 12)))
cmat <- cbind(cmat, cmat[,1]/cmat[,2])
cmat <- cbind(cmat, 2*pnorm(-cmat[,3]))
colnames(cmat) <- c("Estimate", "Std.Err", "Z value", "Pr(>z)")
#
2018 May 31
0
mysterious rounding digits output
>>>>> Ted Harding
>>>>> on Thu, 31 May 2018 07:10:32 +0100 writes:
> Well pointed out, Jim!
> It is infortunate that the documentation for options(digits=...)
> does not mention that these are *significant digits*
> and not *decimal places* (which is what Joshua seems to want):
Since R 3.4.0 the help on ?options *does* say
2005 Jan 19
2
signif() generic
Dear list,
I'm trying to write a class for Gaussian error propagation of measured
values and their (estimated) errors,
> setClass("sec", representation(val="numeric", err="numeric"))
I've already successfully implemented basic arithmetics using mostly the
"Arith" group generics. But I'm running into trouble when trying to get
signif() to
2009 Nov 20
0
rounding the time: significant 0 does not appear (PR#14075)
This is not a bug, and has nothing to do with times. For example:
> round(1.03,1)
[1] 1
Formatting is not the same as rounding. Perhaps you are assuming R
formats numbers according to the concept of significant digits, but
it doesn't. See the help page for the format function to get started
with understanding R's rules for formatting numbers when it displays
them. Maybe also some
2010 Oct 05
1
party with mob - parameter estimates not significant in terminal nodes
Dear useRs:
I successfully model-based partitioned several datasets through the use of
mob from the party package (thanks Achim et al. once again !!!). At times,
however, the partitioning leads to terminal nodes in which the parameter
estimates of the model are not significant (although the split points and in
general the proposed segmentation both seem reasonable). As I do not seem
to be able
2011 Oct 17
1
compressing/reducing data for plot
Hello,
I have simulation results in the form of
Time V I
0.000000000000e+000 7.218354344368e-001 5.224478627497e-006
1.000000000000e-009 7.218354344368e-001 5.224477718002e-006
2.000000000000e-009 7.218354344368e-001 5.224477718002e-006
4.000108361244e-009 7.218354344368e-001 5.224478627497e-006
8.000325083733e-009