similar to: Returning index of vector element matching specific value

Displaying 20 results from an estimated 10000 matches similar to: "Returning index of vector element matching specific value"

2023 Jan 07
1
gmp::bigq vs. MASS::fractions
On Sat, 7 Jan 2023 17:29:35 +0100 Sigbert Klinke <sigbert at wiwi.hu-berlin.de> wrote: > > x <- (0:7)/7 > > > MASS::fractions(x) > > [1] 0 1/7 2/7 3/7 4/7 5/7 6/7 1 > > > gmp::as.bigq(x) > > Big Rational ('bigq') object of length 8: > > [1] 0 > 2573485501354569/18014398509481984 2573485501354569/9007199254740992 >
2008 May 16
2
Integer / floating point question
Dear R-help - I have thought about this question for a bit, and come up with no satisfactory answer. Say I have the numeric vector t1, given as t1 <- c(1.0, 1.5, 2.0, 2.5, 3.0) I simply want to reliably extract the unique integers from t1, i.e., the vector c(1, 2, 3). This is of course superficially simple to carry out. However, my question is related to R FAQ 7.31, "Why
2012 May 30
0
Survival with different probabilities of censoring
Dear all I have a fairly funky problem that I think demands some sort of survival analysis. There are two Red List assessments for mammals: 1986 and 2008. Some mammals changed their Red List status between those dates. Those changes can be regarded as "events" and are "interval censored" in the sense that we don't know at what point between 1986 and 2008 each species
2009 Aug 06
0
About numerical accuracy: should there be a rational number class for fractions?
Hello, useRs. I was monitoring the recent thread about the numerical (in)accuracy of the C pow function and the apparent mismatch between R and matlab. That particular problem has been addressed, but it seems there are many others awaiting. I'm wondering if there is advice for package writers & prospective R contributors about avoiding the most common sorts of numerical mistakes. Has
2023 Jan 07
2
gmp::bigq vs. MASS::fractions
Hi, has someone experience which routine should be used for creating fractional numbers? The two conversion routines deliver different results > x <- (0:7)/7 > MASS::fractions(x) [1] 0 1/7 2/7 3/7 4/7 5/7 6/7 1 > gmp::as.bigq(x) Big Rational ('bigq') object of length 8: [1] 0 2573485501354569/18014398509481984 2573485501354569/9007199254740992 [4]
2007 Nov 20
2
as.character(seq(-.35,.95,.1))
> as.character(seq(-.25,.95,.1)) [1] "-0.25" "-0.15" "-0.05" "0.05" "0.15" "0.25" "0.35" "0.45" "0.55" "0.65" "0.75" "0.85" "0.95" > as.character(seq(-.35,.95,.1)) [1] "-0.35" "-0.25"
2011 Nov 01
1
condition has length > 1 for LL denominator
I have a dataset called "results" that looks like this: arrive depart intercept 1 1 1 1 2 1 1 3 1 1 2 2 1 3 2 1 3 3 2 2 2 2 3 2 3 3 3 where arrive is the period of arrival, depart is the period of departure, and intercept
2024 Feb 02
1
gathering denominator under frac
?s 10:01 de 02/02/2024, Troels Ring escreveu: > Hi friends - I'm plotting a ratio of bicarbonates i ggplot2 and > > ylab(expression(paste(frac("additive BIC","true BIC")))) worked OK - but > now I have been asked to put the chemistry instead - so I wrote > >
2024 Feb 02
1
gathering denominator under frac
... or if I understand correctly, simply expression(frac(additive ~ HCO[3]^"-", true ~ HCO[3]^"-" ))) Cheers, Bert On Fri, Feb 2, 2024 at 3:06?AM Rui Barradas <ruipbarradas at sapo.pt> wrote: > ?s 10:01 de 02/02/2024, Troels Ring escreveu: > > Hi friends - I'm plotting a ratio of bicarbonates i ggplot2 and > > > >
2006 May 19
2
lmer, p-values and all that
Users are often surprised and alarmed that the summary of a linear mixed model fit by lmer provides estimates of the fixed-effects parameters, standard errors for these parameters and a t-ratio but no p-values. Similarly the output from anova applied to a single lmer model provides the sequential sums of squares for the terms in the fixed-effects specification and the corresponding numerator
2017 Sep 06
2
[PATCH] [RESEND] drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning
On Wed, Sep 6, 2017 at 4:20 PM, Karol Herbst <karolherbst at gmail.com> wrote: >> In this instance, I think using multiplication is more intuitive >> than '&&', so I'm adding a comparison to zero instead to shut up >> the warning. To further improve readability, I also make the >> error case indented and leave the normal case as the final
2017 Mar 15
2
Speculative execution of FP divide Instructions - Call-Graph Simplify
Hi all, I came across an issue caused by the Call-Graph Simplify Pass. Here is a a small repro: ``` define double @foo(double %a1, double %a2, double %a3) #0 { entry: %a_mul = fmul double %a1, %a2 %a_cmp = fcmp ogt double %a3, %a_mul br i1 %a_cmp, label %a.then, label %a.end a.then: %a_div = fdiv double %a_mul, %a3 br label %a.end a.end: %a_factor = phi double [ %a_div, %a.then ],
2017 Sep 06
0
[PATCH] [RESEND] drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning
On Wed, Sep 6, 2017 at 3:56 PM, Arnd Bergmann <arnd at arndb.de> wrote: > gcc thinks that interpreting a multiplication result as a bool > is confusing: > > drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c: In function 'read_pll': > drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c:133:8: error: '*' in boolean context, suggest '&&' instead
2017 Sep 06
0
[PATCH] [RESEND] drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning
On Wed, Sep 6, 2017 at 10:11 PM, Arnd Bergmann <arnd at arndb.de> wrote: > On Wed, Sep 6, 2017 at 4:20 PM, Karol Herbst <karolherbst at gmail.com> wrote: >>> In this instance, I think using multiplication is more intuitive >>> than '&&', so I'm adding a comparison to zero instead to shut up >>> the warning. To further improve
2003 Oct 21
2
Denominator Degrees of Freedom in lme() -- Adjusting and Understanding Them
Hello all. I was wondering if there is any way to adjust the denominator degrees of freedom in lme(). It seems to me that there is only one method that can be used. As has been pointed out previously on the list, the denominator degrees of freedom given by lme() do not match those given by SAS Proc Mixed or HLM5. Proc Mixed, for example, offers five different options for computing the
2024 Feb 02
1
gathering denominator under frac
Hi friends - I'm plotting a ratio of bicarbonates i ggplot2 and ylab(expression(paste(frac("additive BIC","true BIC")))) worked OK - but now I have been asked to put the chemistry instead - so I wrote ?ylab(expression(paste(frac("additive",HCO[3]^"-","true",HCO[3]^"-")))) - and frac saw that as additive = numerator and HCO3- =
2019 Aug 26
0
[PATCH v7 1/6] drm/dp_mst: Add PBN calculation for DSC modes
With DSC, bpp can be fractional in multiples of 1/16. Change drm_dp_calc_pbn_mode to reflect this, adding a new parameter bool dsc. When this parameter is true, treat the bpp parameter as having units not of bits per pixel, but 1/16 of a bit per pixel v2: Don't add separate function for this Cc: amd-gfx at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Cc: intel-gfx at
2019 Aug 26
0
[PATCH v6 1/6] drm/dp_mst: Add PBN calculation for DSC modes
With DSC, bpp can be fractional in multiples of 1/16. Change drm_dp_calc_pbn_mode to reflect this, adding a new parameter bool dsc. When this parameter is true, treat the bpp parameter as having units not of bits per pixel, but 1/16 of a bit per pixel v2: Don't add separate function for this Cc: amd-gfx at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Cc: intel-gfx at
2019 Aug 27
0
[PATCH v9 1/6] drm/dp_mst: Add PBN calculation for DSC modes
With DSC, bpp can be fractional in multiples of 1/16. Change drm_dp_calc_pbn_mode to reflect this, adding a new parameter bool dsc. When this parameter is true, treat the bpp parameter as having units not of bits per pixel, but 1/16 of a bit per pixel v2: Don't add separate function for this Cc: amd-gfx at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Cc: intel-gfx at
2001 Sep 27
2
ugly in plotmath: frac(1, sqrt(...)) (PR#1101)
Sometimes (dependent on device and settings of 'cex' and 'lwd') the line of a square root symbol plottet in the denominator of a fraction appears to be in or above the line of the fraction. Examples: ### Choose one of these: # pdf("test.pdf", height=6, width=8) # bmp("test.bmp", width=1100, height=800, pointsize=12) # bitmap("test.tif",