search for: rounded

Displaying 20 results from an estimated 9298 matches for "rounded".

2011 Mar 30
0
Plot an ols() call from Design
Dear users, I am attempting to plot an ols() call from the Design package, by following the procedure explained by Harald Baayen in his 2008 book 'Analyzing linguistic data. A practical introduction to statistics using R', page 175-181. I've attached my data to this e-mail (I hope it's small enough that that's ok). First I paste all the commands I ran, followed by the
2009 May 20
2
round function seems to produce maximum 2 decimals
I am trying to use round()to force R to display a specific number of decimals, but it seems to display <=2 decimals no matter what I specify in the digits argument. As an alternative I tried signif(), but it also produces unexpected results. See example code and results below. Format() works, but then the result no longer is numeric. Am I missing something simple? I am using R 2.9.0 on Windows
2013 Jan 03
3
Question on Round function
I happened to see these: > round(.5, 0) [1] 0 > round(1.5, 0) [1] 2 > round(2.5, 0) [1] 2 > round(3.5, 0) [1] 4 > round(4.5, 0) [1] 4 What is the rule here? Should not round(.5, 0) = 1, round(2.5, 0) = 3 etc? Thanks and regards,
2007 Jul 06
0
Branch 'as' - 2 commits - libswfdec/swfdec_as_math.c test/trace
libswfdec/swfdec_as_math.c | 10 +++++++++- test/trace/Makefile.am | 9 +++++++++ test/trace/round-direction-5.swf |binary test/trace/round-direction-5.swf.trace | 5 +++++ test/trace/round-direction-6.swf |binary test/trace/round-direction-6.swf.trace | 5 +++++ test/trace/round-direction-7.swf |binary
2024 Feb 08
1
round.Date and trunc.Date not working / implemented
Technically, there is a round() for 'Date' objects, but it doesn't seem very useful, because it basically just fall back to the default round() method, which only takes the 'digits' argument. Here's an example: > date <- Sys.Date() > class(date) [1] "Date" We see that there are only two round() methods in addition to the implicit built-in one; >
2006 Mar 07
13
Active Record - Can''t figure out relationship.
I have the following two tables: create table teams ( id int not null auto_increment, short_name varchar(12) not null, long_name varchar(50) not null, logo varchar(20) not null, primary key (id) ); create table rounds ( id int not null auto_increment, home_team_id int not null, away_team_id int
2008 Jun 15
2
round(1.5) = round(2.5) = 2?
Dear R-users with a bit of grief I had to repeat an extensive analysis because I did not suspect (and therefore did not read the documentation) that round was implemented as "for rounding off a 5, the IEC 60559 standard is expected to be used, 'go to the even digit'", resulting in round(1.5) = 2 round (2.5) = 2. As a non-mathematician I am both puzzled and intrigued by
2024 Feb 08
1
round.Date and trunc.Date not working / implemented
This is a workaround, and could be the basis for a round.Date improvement: date <- Sys.Date() as.Date(round(as.POSIXct(date), "years")) as.Date(round(as.POSIXct(Sys.Date() + 180), "years")) Duncan Murdoch On 08/02/2024 12:23 p.m., Henrik Bengtsson wrote: > Technically, there is a round() for 'Date' objects, but it doesn't > seem very useful,
2024 Feb 08
1
round.Date and trunc.Date not working / implemented
?s 14:36 de 08/02/2024, Olivier Benz via R-devel escreveu: >> On 8 Feb 2024, at 15:15, Martin Maechler <maechler at stat.math.ethz.ch> wrote: >> >>>>>>> Ji?? Moravec >>>>>>> on Wed, 7 Feb 2024 10:23:15 +1300 writes: >> >>> This is my first time working with dates, so if the answer is "Duh, work >>> with
2024 Feb 09
1
round.Date and trunc.Date not working / implemented
> This is a workaround, and could be the basis for a round.Date improvement: >?? date <- Sys.Date() >?? as.Date(round(as.POSIXct(date), "years")) >?? as.Date(round(as.POSIXct(Sys.Date() + 180), "years")) > Duncan Murdoch That would work, perhaps structured similarly as `trunc.Date` is. The only issue might be that `trunc.Date` is currently using
2020 Feb 08
1
round(x, dig) [was "Development version of R fails tests .."]
...gt; 27 January. Since then the script always fails as a regression test >> seems to fail. Specifically, in the tests/ subdirectory of my build >> directory I have a file reg-tests-1d.Rout.fail which ends with: >> >> > ## more than half of the above were rounded *down* in R <= 3.6.x >> > ## Some "wrong" test cases from CRAN packages (partly relying on wrong R <= 3.6.x behavior) >> > stopifnot(exprs = { >> + all.equal(round(10.7775, digits=3), 10.778, tolerance = 1e-12) # even tol=0, was 10.777 &gt...
2006 Jun 23
6
float calculation error
Hi I have the following values pActualCost = 33.00 pPaymentCost = 29.99 So this calculation should leave me with 0.01 pPaymentDifference = pActualCost - pPaymentCost however when doing this in rails, it returns 0.00999999999999801 has anyone got any suggestions to whats going wrong and how I can correct this Thanks Scott -- Posted via http://www.ruby-forum.com/.
2007 Aug 02
6
- round() strange behaviour
Hi, I am getting some strange results using round - it seems that it depends if the number before the decimal point is odd or even .... For example: > round(1.5)[1] 2> round(2.5)[1] 2 While i would expect that round(2.5) be 3 and not 2. Do you have any explanation for that? I really appreciate your input, Monica
2024 Feb 08
2
round.Date and trunc.Date not working / implemented
> On 8 Feb 2024, at 15:15, Martin Maechler <maechler at stat.math.ethz.ch> wrote: > >>>>>> Ji?? Moravec >>>>>> on Wed, 7 Feb 2024 10:23:15 +1300 writes: > >> This is my first time working with dates, so if the answer is "Duh, work >> with POSIXt", please ignore it. > >> Why is not `round.Date` and
2020 Sep 04
3
Misleading documentation on FP to integer conversion instructions?
> On Sep 4, 2020, at 2:40 PM, Neil Nelson via llvm-dev <llvm-dev at lists.llvm.org> wrote: > >> If fptosi takes 0.9 -> 0, then that is not 'rounding' in any sense I'm aware of (IEEE754 or otherwise). >> Rounding (in the IEE754 sense) determines how a number is converted when it is halfway between two >> candidate results. (see round(), ceil(),
2005 Oct 24
1
Problems with pf() with certain noncentral values/degrees of freedom combinations
Hello all. It seems that the pf() function when used with noncentral parameters can behave badly at times. I've included some examples below, but what is happening is that with some combinations of df and ncp parameters, regardless of how large the quantile gets, the same probability value is returned. Upon first glance noncentral values greater than 200 may seem large, but they are in
2011 Dec 01
3
round to specific intervals
...there an existing function in which you can round numbers to a set of values. I know you can use 5 * round(x/5) for rounding to the nearest 5 or so, but what if the interval size is not constant. For example: ## Not run test <- rnorm(100) round(test, c(1, 5, 10, 20, 50)) so that the test is rounded to the closest value in the vector. Thanks for the help. Cheers,
2012 Apr 03
1
"Failed to create rounding.h!" during make
Hello All, I'm attempting to compile rsync on Solaris 10 x86 to include atime support. I've managed to patch the source, and install gcc and the necessary other packages necessary to get as far as ./configure successfully (I'm afraid I'm more of a linux than a solaris guy). I'm unable to "make" the Makefile. Did some STFW'ing and have found several variations
2012 Sep 12
8
Round off method in 1.8.7
Hi all i am trying to use round method if have a value 2.08 i want it as 2.1 and it worked in 1.9.2 but not in 1.8.7 is there any other way of doing it. USING 1.9.2 1.9.2p320 :001 > 2.08.round(1) => 2.1 1.9.2p320 :002 > 2.04.round(1) => 2.0 USING 1.8.7 irb(main):001:0> 2.08.round => 2 irb(main):002:0> 2.08.round(1) ArgumentError: wrong number of arguments (1 for
2011 Jul 28
2
Animated gif or something similar in R?
I'm have a (minor) problem and a question. Problem: The following code creates 5 clusters of dots of different colors. However, I need the second call outside the data.frame call to get the colors to change for some reason. I assume there's an error in the data.frame() call, but I don't know what. Question: Is there is a way to cause the resulting graphic to rotate on it's