Displaying 20 results from an estimated 10000 matches similar to: "round to specific intervals"
2013 May 11
0
[LLVMdev] gcc 4.8.x dragonegg support
On Thu, May 09, 2013 at 12:21:30PM -0400, Jack Howarth wrote:
> On Wed, May 08, 2013 at 06:53:05AM -0700, Peter Collingbourne wrote:
> > On Wed, May 08, 2013 at 09:25:55AM -0400, Jack Howarth wrote:
> > > Duncan,
> > > I was wondering if you plan on supporting the build of dragonegg under gcc 4.8.1svn
> > > for the llvm 3.3 release? Is the deprecation and
2013 May 09
4
[LLVMdev] gcc 4.8.x dragonegg support
On Wed, May 08, 2013 at 06:53:05AM -0700, Peter Collingbourne wrote:
> On Wed, May 08, 2013 at 09:25:55AM -0400, Jack Howarth wrote:
> > Duncan,
> > I was wondering if you plan on supporting the build of dragonegg under gcc 4.8.1svn
> > for the llvm 3.3 release? Is the deprecation and poisoning of IDENT_ASM_OP too problematic
> > to work around without some
2009 Sep 16
1
Is there a way to round numbers up or down to the nearest "natural looking" number?
Hi all,
Given the following series of numbers:
> t
[1] 21.85000 30.90410 43.71000 61.82234 87.43999 123.67296
[7] 174.91997 247.40249 349.91996 494.91815 700.00000
What's the simplest way of formatting them into the nearest "natural
looking" (rounded to nearest multiple of 10) numbers?
So:
t[1] becomes 20
t[2] becomes 30
t[3] becomes 40
t[4] becomes 60
t[5] becomes 90
2013 Jun 18
2
find closest value in a vector based on another vector values
Dear All,
would you please provide your thoughts on the following:
let us say I have:
a <-c(1,5,8,15,32,69)
b <-c(8.5,33)
and I would like to extract from "a" the two values that are closest to the values in "b", where the length of this vectors may change but b will allways be shorter than "a". So at the end based on this example I should have the result
2007 Sep 06
2
larger decimal numbers get rounded ....
Hi,
I am sure there is a reason but ...... why larger decimal numbers get rounded to the nearest integer?
Example:
a <- 3308000.5
a
[1] 3308001
I would like my numbers to be decimals .... since they do represent coordinates and i don't want them rounded .... how can i keep them as they are?
Thanks,
Monica
_________________________________________________________________
2012 Jul 19
1
Truncating (rounding down) to nearest half hour.
I couldn't find anything in the chron or timeDate packages, and a good search
yielded rounding to the nearest half hour, which I don't want.
The data:
structure(list(Date = structure(c(1209625080, 1209641460, 1209652500,
1209676800, 1209682860, 1209692100, 1209706980, 1209722580, 1209726300,
1209739620, 1209762780, 1209765720, 1209770520, 1209791040, 1209812580,
1209829920,
2003 Mar 15
3
round() seems inconsistent when rounding 5s
It may be my lack of unerstanding, but round() seems to me to give
inconsistent results when rounding 5s as in the following examples?
> round(1.45, 1)
[1] 1.4 # OK
> round(2.45, 1)
[1] 2.5 # shouldn't this be 2.4?
> round(1.05, 1)
[1] 1.1 # 1.0 ?
and signif():
> signif(2.445, 3)
[1] 2.44 # OK
> signif(3.445, 3)
[1]
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>
2011 Dec 12
2
round Date object to 10 minutes intervals?
Hello *,
I'm trying to round time stamps, consisting of a date and time part, to 10
minutes intervals
The timestamps have the following format: %d.%m.%Y %H:%M
*timeStamp <- c("31.03.2011 09:30", "31.03.2011 09:41", "31.03.2011 10:04",
"31.03.2011 10:10", "31.03.2011 10:28", "31.03.2011 10:35", "31.03.2011
10:49",
2010 Dec 09
1
set dataframe field value from lookup table
Hi
This is (hopefully) a bit more cogent phrasing of a previous post. I'm
trying to compute a z-score to rows in a large dataframe based on values in
another dataframe. Here's the script (that does not work). 2 questons,
1) Anyone know of a more elegant way to calculate the "rounded" age value
than the nested ifelse's I've used?
2) how to reference the lookup table
2016 Oct 21
2
Problem with REMAINDER? 957%60 be 15 remainder 57 not 15 remainder -3 ?
I'm not mathematically gifted, but shouldn't 957%60 be 15 remainder 57?
Google and my desktop calculator certainly think so.
So where am I going wrong here? The following code
exten => 7,1,Verbose(Context: ${CONTEXT} Exten:${EXTEN})
same => n,Set(myNum=957)
same => n,Set(sec=$[REMAINDER(${myNum},60)])
same => n,Set(sec=$[ABS(${sec})])
same =>
2009 May 22
5
Need a faster function to replace missing data
Dear List,
I need some help in coming up with a function that will take two data sets, determine if a value is missing in one, find a value in the second that was taken at about the same time, and substitute the second value in for where the first should have been. My problem is from a fish tracking study. We put acoustic tags in fish and track them for several days. Location data is supposed
2020 Feb 08
1
round(x, dig) [was "Development version of R fails tests .."]
>>>>> Hugh Parsonage
>>>>> on Sat, 8 Feb 2020 21:12:43 +1100 writes:
> The only observation I can make is that the change to
> round() was made in r77727 whereas your R-devel appears to
> be r77715 (so would not exhibit the fixed behaviour). My
> guess is that there was a perpetual installation failure
> after r77715 but that
2018 Sep 20
3
A different error in sample()
Good day,
The use of "rounding" also doesn't make sense. If The number is halfway between two integers, it is rounded to the nearest even integer.
> round(2.5)
[1] 2
--------------------------------------
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia
2011 Dec 06
1
help wrapping findInterval into a function
Dear R Community,
I hope you might be able to assist with a small problem creating a function.
I am working with water-quality data sets that contain the concentration of
many different elements in water samples. I need to assign quality-control
flags to values that fall into various concentration ranges. Rather than a
web of nested if statements, I am employing the findInterval function to
2016 Aug 04
1
findInterval(all.inside=TRUE) for degenerate 'vec' arguments
What should findInterval(x,vec,all.inside=TRUE) return when length(vec)<=1,
so there are no inside intervals?
R-3.3.0 gives a decreasing map of x->output when length(vec)==1 and -1's
when length(vec)==0. Would '0' in all those cases be better?
> findInterval(x=c(10, 11, 12), vec=11, all.inside=TRUE,
rightmost.closed=FALSE, left.open=FALSE)
[1] 1 0 0
>
2006 Aug 08
1
locating intervals
Hi ,
I have two sorted vectors X and Xi, where the range of Xi lies within the
range of X.
For an element in Xi, I want to find the neigbouring data in X, e.g. find an
index ix
so that for element number k, then
X[ix[k]] < X[k] < X[ix[k] +1] # also OK with "<=" on either one, but not
both
This is easy to code by looping over the data in X,Xi, but I suspect there
may be a
2006 Aug 08
1
locating intervals (corrected version)
I have corrected a typo in my previous posting. In what follows the
line with the inequality is correct
Hi ,
I have two sorted vectors X and Xi, where the range of Xi lies within the
range of X.
For an element in Xi, I want to find the neigbouring data in X, e.g. find an
index ix
so that for element number k, then
X[ix[k]] < Xi[k] < X[ix[k] +1] # also OK with "<=" on either
2011 Oct 23
1
Creating 2 week intervals (lubridate)
Hello,
I have a list of dates in which I am going use for a time series analysis. I want to break these dates up into 2 week intervals and count the number of times a date appears in this interval.
For example from Nov. 19, 2000 to Dec 2 ,2000 with the data listed below I want to return
Start_date Count2000/11/19 4
Date: 2000/11/20 2000/11/21 2000/11/19 2000/11/29
My first approach was toa
2008 Jul 25
5
VT-d "partial" success - passing DVB-S tuner to Windows DomU (based off previous thread of similar name!)
Hi All,
So I''ve got a DVB-S PCI Express card ($30 USD Twinhan AD-SE200 off
eBay) that''s being passed via VT-d/pciback in Xen 3.2.1 under CentOS
5.2 to a Windows XP SP3 which works! ... except for one small issue...
Motherboard is an Intel DQ35JO that much people has had success with
and an Intel E8400 CPU.
The issue is that when dealing with FTA MPEG-2 transport streams (DVB-S