search for: hwborcher

Displaying 20 results from an estimated 40 matches for "hwborcher".

Did you mean: hwborchers
2016 Sep 09
3
Different results for tan(pi/2) and tanpi(1/2)
...(pi*x) as x approaches 1/2 are different, +Inf and -Inf, so the limit is > not well defined. Hence the computer function tanpi(1/2) ought to return > Not-a-Number. > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Fri, Sep 9, 2016 at 10:24 AM, Hans W Borchers <hwborchers at gmail.com> > wrote: >> >> As the subject line says, we get different results for tan(pi/2) and >> tanpi(1/2), though this should not be the case: >> >> > tan(pi/2) >> [1] 1.633124e+16 >> >> > tanpi(1/2) >> [1] NaN...
2016 Sep 09
3
Different results for tan(pi/2) and tanpi(1/2)
As the subject line says, we get different results for tan(pi/2) and tanpi(1/2), though this should not be the case: > tan(pi/2) [1] 1.633124e+16 > tanpi(1/2) [1] NaN Warning message: In tanpi(1/2) : NaNs produced By redefining tanpi with sinpi and cospi, we can get closer: > tanpi <- function(x) sinpi(x) / cospi(x) > tanpi(c(0, 1/2, 1, 3/2, 2))
2016 Sep 09
0
Different results for tan(pi/2) and tanpi(1/2)
.... Using finite precision approximations to irrational and other numbers that cannot be stored exactly can have all types of problems at and near certain values, that is why there are many specific functions for calculating in those regions. On Fri, Sep 9, 2016 at 12:55 PM, Hans W Borchers <hwborchers at gmail.com> wrote: > The same argument would hold for tan(pi/2). > I don't say the result 'NaN' is wrong, > but I thought, > tan(pi*x) and tanpi(x) should give the same result. > > Hans Werner > > > On Fri, Sep 9, 2016 at 8:44 PM, William Dunlap <wdun...
2024 Apr 22
2
x[0]: Can '0' be made an allowed index in R?
...1) {print(df[abs(i)])} Tim -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of Peter Dalgaard via R-help Sent: Monday, April 22, 2024 10:36 AM To: Rolf Turner <rolfturner at posteo.net> Cc: R help project <r-help at r-project.org>; Hans W <hwborchers at gmail.com> Subject: Re: [R] x[0]: Can '0' be made an allowed index in R? [External Email] Heh. Did anyone bring up negative indices yet? -pd > On 22 Apr 2024, at 10:46 , Rolf Turner <rolfturner at posteo.net> wrote: > > > See fortunes::fortune(36). > > che...
2008 Apr 01
2
Applying rbind() to a sequence of data frame names
I have a set of data frames ds1, ds2, ... each having the same columns and column names: ds1 <- data.frame(x=c(1,2,3,4), y=c(5,6,7,8)) ds1 <- data.frame(x=c(9,10,11,12), y=c(13,14,15,16)) ... and I would like to combine them into just one data frame like ds <- rbind(ds1, ds2, ...) Because there are so many of them, I will have to use a character array nms <-
2024 Apr 21
1
x[0]: Can '0' be made an allowed index in R?
https://cran.r-project.org/package=index0 On Sun, Apr 21, 2024, 3:56 AM Hans W <hwborchers at gmail.com> wrote: > As we all know, in R indices for vectors start with 1, i.e, x[0] is not a > correct expression. Some algorithms, e.g. in graph theory or combinatorics, > are much easier to formulate and code if 0 is an allowed index pointing to > the first element of the vec...
2024 Apr 23
2
x[0]: Can '0' be made an allowed index in R?
...Original Message----- >> From: R-help <r-help-bounces at r-project.org> On Behalf Of Peter Dalgaard via R-help >> Sent: Monday, April 22, 2024 10:36 AM >> To: Rolf Turner <rolfturner at posteo.net> >> Cc: R help project <r-help at r-project.org>; Hans W <hwborchers at gmail.com> >> Subject: Re: [R] x[0]: Can '0' be made an allowed index in R? >> >> [External Email] >> >> Heh. Did anyone bring up negative indices yet? >> >> -pd >> >>> On 22 Apr 2024, at 10:46 , Rolf Turner <rolfturner at p...
2024 Apr 23
1
x[0]: Can '0' be made an allowed index in R?
...> > -----Original Message----- > From: R-help <r-help-bounces at r-project.org> On Behalf Of Peter Dalgaard via R-help > Sent: Monday, April 22, 2024 10:36 AM > To: Rolf Turner <rolfturner at posteo.net> > Cc: R help project <r-help at r-project.org>; Hans W <hwborchers at gmail.com> > Subject: Re: [R] x[0]: Can '0' be made an allowed index in R? > > [External Email] > > Heh. Did anyone bring up negative indices yet? > > -pd > >> On 22 Apr 2024, at 10:46 , Rolf Turner <rolfturner at posteo.net> wrote: >> &...
2024 Apr 23
1
x[0]: Can '0' be made an allowed index in R?
...ay do what you need and preserve functionality. -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of John Fox Sent: Tuesday, April 23, 2024 10:24 AM To: Peter Dalgaard <pd.mes at cbs.dk> Cc: R help project <r-help at r-project.org>; Hans W <hwborchers at gmail.com> Subject: Re: [R] x[0]: Can '0' be made an allowed index in R? Hello Peter, Unless I too misunderstand your point, negative indices for removal do work with the Oarray package (though -0 doesn't work to remove the 0th element, since -0 == 0 -- perhaps what you meant...
2024 Apr 21
5
x[0]: Can '0' be made an allowed index in R?
As we all know, in R indices for vectors start with 1, i.e, x[0] is not a correct expression. Some algorithms, e.g. in graph theory or combinatorics, are much easier to formulate and code if 0 is an allowed index pointing to the first element of the vector. Some programming languages, for instance Julia (where the index for normal vectors also starts with 1), provide libraries/packages that allow
2008 Mar 27
1
R Code and the Pygments Python SyntaxHighlighter
Dear R Help, is someone going to write a R/S language lexer for the Pygments Python syntax highlighter <http://pygments.org/>? As it is used now by Trac, Django, or the Python documentation tool Sphinx, the R community can apply it in Python-based Wikis like Moinmoin and others. Hans Werner
2014 Apr 27
1
Strange behaviour of the ':' operator
Is the following really intended behaviour of the ':' operator, > s <- pi - 3.0 + 1e-07 > x <- s:pi > x [1] 0.1415928 1.1415928 2.1415928 3.1415928 though the last entry in the range vector is greater than pi? > x[4] > pi; x[4] - pi [1] TRUE [1] 1e-07 and the same, of course, for the seq() function. I would understand this behaviour for
2007 Nov 13
1
Discrimination of almost-random time series
Dear time-series specialist: I've got some time series representing measurements from a physical process, like atomic decay data. These time series look almost random, but should hopefully be distinguishable as they were taken under different conditions. I am looking for statistical approaches that are sensitive enough to discriminate between such series of measurements. Preferably, there
2009 Feb 17
3
Subset Regression Package
Dear all , Is there any subset regression (subset selection regression) package in R other than "leaps"? Thanks and regards Alex [[alternative HTML version deleted]]
2023 Aug 13
4
Noisy objective functions
While working on 'random walk' applications, I got interested in optimizing noisy objective functions. As an (artificial) example, the following is the Rosenbrock function, where Gaussian noise of standard deviation `sd = 0.01` is added to the function value. fn <- function(x) (1+rnorm(1, sd=0.01)) * adagio::fnRosenbrock(x) To smooth out the noise, define another
2024 Apr 22
1
x[0]: Can '0' be made an allowed index in R?
Heh. Did anyone bring up negative indices yet? -pd > On 22 Apr 2024, at 10:46 , Rolf Turner <rolfturner at posteo.net> wrote: > > > See fortunes::fortune(36). > > cheers, > > Rolf Turner > > -- > Honorary Research Fellow > Department of Statistics > University of Auckland > Stats. Dep't. (secretaries) phone: > +64-9-373-7599
2012 May 17
3
Optimization inconsistencies
I have a very simple maximization problem where I'm solving for the vector x: objective function: w'x = value to maximize box constraints (for all elements of w): low < x < high equality constraint: sum(x) = 1 But I get inconsistent results depending on what starting values I. I've tried various packages but none seem to bee the very solver in Excel. Any recommendations on
2010 Mar 21
2
Find a rectangle of maximal area
For an application in image processing -- using R for statistical purposes -- I need to solve the following task: Given n (e.g. n = 100 or 200) points in the unit square, more or less randomly distributed. Find a rectangle of maximal area within the square that does not contain any of these points in its interior. If a, b are height and width of the rectangel, other constraints may have to be
2008 Aug 19
1
nonlinear constrained optimization
Hi. I need some advises on how to use R to find pi (i is the index) with the following objective function and constraint: max (sum i)[ f(ai, bi, pi) * g(ci, di, pi) * Di ] s.t. (sum i)[ f(ai, bi, pi) * Di * pi] / (sum i)[ f(ai, bi, pi) * Di ] <= constant f and g are diffentiable. So, I am thinking of optim with method = "BFGS"? But wonder how to include the
2009 Jul 07
3
r-project.org address blacklisted by anti-spam software
Dear List: An e-mail mentioning the r-project.org address and sent to a friend at a German university was considered spam by the local spam filter. Its reasoning: the URL "r-project.org" is blacklisted at uribl.swinog.ch resp. at antispam.imp.ch. I checked the list http://antispam.imp.ch/swinog-uri-rbl.txt [caution: long list] and indeed, there it was. Can anybody explain how or