similar to: Simple Lookup... why so slow

Displaying 20 results from an estimated 2000 matches similar to: "Simple Lookup... why so slow"

2003 Aug 13
6
placing labels in polygon center ?
Dear all, is there any function to calculate the center of a polygon mass in R? Actually I need to find the best location within polygons to place labels. Thanks for any hint Jens Oehlschl?gel -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test\ --------...{{dropped}}
2010 Jul 12
6
in continuation with the earlier R puzzle
When I just run a for loop it works. But if I am going to run a for loop every time for large vectors I might as well use C or any other language. The reason R is powerful is becasue it can handle large vectors without each element being manipulated? Please let me know where I am wrong. for(i in 1:length(news1o)){ + if(news1o[i]>s2o[i]) + s[i]<-1 + else + s[i]<--1 + } --
2010 Dec 22
4
vectorised recovery of strsplit value ??
Dear Guru's My first steps with R have ground to a halt! I have a vector of sample identifiers > sampleIDs [1] "D1_1" "D1_2" "D1_3" "D1_4" "D1_5" "D1_6" "D1_7" "D1_8" [9] "D1_9" "D1_10" "D1_11" "D1_12" "F1_13" "F1_14"
2016 Aug 20
2
LLVM flags for Vectorization
Hi, I have been analyzing the LLVM vectorizer by running some benchmarks. For vectorization, I have used the following flags: -O3 -ffast-math -mavx2 Am I missing any other flags which will improve vectorizer performance? Thanks, Santanu Das IIT Hyd -------------- next part -------------- An HTML attachment was scrubbed... URL:
2003 Dec 14
5
reverse lexicographic order
Hi all, I have some email addresses that I would like to sort in reverse lexicographic order so that addresses from the same domain will be grouped together. How might that be done? Murray -- Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: maj at waikato.ac.nz
2016 Apr 07
4
simple question on data frames assignment
Hi I'm not sure how to ask this, but its a very easy question to answer for an R person. What is an easy way to check for a column value and then assigne a new column a value based on that old column value? For example, Im doing colordata <- data.frame(id = c(1,2,3,4,5), color = c("blue", "red", "green", "blue", "orange")) for (i in
2001 Sep 06
2
Array as time series?
Dear R-helpers, I have 4-dimensional atmospheric data (x,y,z,t), which I want to analyse on spatio-temporal diversities. As far as I understand there only exists the possibility to construct time series as two-dimensional matrices (mts). For the moment, I hold it in different objects: 1. a four-dimensional array for the spatial related analyses 2. a two-dimensional mts timeserie, which was
2016 Apr 07
0
simple question on data frames assignment
ifelse is vectorised, so just use that without the loop. colordata$response <- ifelse(colordata$color == 'blue', 1, 0) David On 7 April 2016 at 12:41, Michael Artz <michaeleartz at gmail.com> wrote: > Hi I'm not sure how to ask this, but its a very easy question to answer for > an R person. > > What is an easy way to check for a column value and then assigne a
2019 Feb 01
2
[RFC] Vector Predication
On Thu, Jan 31, 2019 at 4:05 PM Philip Reames via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Do such architectures frequently have arithmetic operations on the mask registers? (i.e. can I reasonable compute a conservative length given a mask register value) If I can, then having a mask as the canonical form and re-deriving the length register from a mask for a sequence of
2016 Apr 07
2
simple question on data frames assignment
== is also vectorised, and you're better off with TRUE and FALSE rather than 1 and 0, so I'd recommend: colordata$response <- colordata$color == 'blue' Hadley On Thu, Apr 7, 2016 at 6:52 AM, David Barron <dnbarron at gmail.com> wrote: > ifelse is vectorised, so just use that without the loop. > > colordata$response <- ifelse(colordata$color ==
2016 Sep 19
3
[arm, aarch64] Alignment checking in interleaved access pass
Hi, As a follow up to Patch D23646 <https://reviews.llvm.org/D23646>, I'm trying to figure out if there should be an alignment check and what the correct approach is. Some background: For stores, the pass turns: %i.vec = shuffle <8 x i32> %v0, <8 x i32> %v1, <0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11> store <12 x i32> %i.vec, <12 x i32>* %ptr
2003 Apr 16
2
trying to plot function using curve
Dear People, I hope someone can help me with this. I have a function (density) which I am trying to plot using curve. I am calling mg.hist(3,2,1), and getting the following errors. Error in xy.coords(x, y, xlabel, ylabel, log) : x and y lengths differ In addition: There were 50 or more warnings (use warnings() to see the first 50) > warnings() 1: longer object length is not a multiple of
2015 Jul 01
2
[LLVMdev] C as used/implemented in practice: analysis of responses
On 1 July 2015 at 17:15, Russell Wallace <russell.wallace at gmail.com> wrote: > I'm proposing that LLVM unilaterally replace most undefined behaviour with > implementation-defined behaviour. That's precisely the problem. Which behaviour? Let's have an example: struct Foo { long a[95]; char b[4]; double c[2]; }; void fuzz(Foo &F) { for (int i=0; i<100;
2010 Dec 30
2
Analysing Character Strings for subsequent frequency analysis
Hi I'm trying to get to grips with R and establish R as a teaching medium in my secondary school. I would like to use R to analyse text so I can produce frequency analysis of the text for subsequent examination of ciphers. I can produce code in VBA but I am struggling when writing in R to examine each character. There must be a clear method using the vectorised format of R. Furthermore,
2004 Sep 14
3
reshaping some data
Hi all, I have a data.frame with the following colnames pattern: x1 y11 x2 y21 y22 y23 x3 y31 y32 ... I.e. I have an x followed by a few y's. What I would like to do is turn this wide format into a tall format with two columns: "x", "y". The structure is that xi needs to be associated with yij (e.g. x1 should next to y11 and y12, x2 should be next to y21, y22, and
2017 Feb 03
2
RFC: Generic IR reductions
Yes, SVE can vectorize early exit loops by using speculative (first-faulting) loads, which essentially give a predicate of the lanes loaded successfully. For uncounted loops with these special loads, the loop predicate tests can be done using a 'ptest' instruction, checking if the last element is active. Amara On 3 February 2017 at 10:15, Simon Pilgrim <llvm-dev at redking.me.uk>
2015 Nov 03
1
Fwd: Rcpp sugar dpois
Hi. Here is a piece of cpp code. It works, but I do not understand the rational for the use of "R::dpois" to call the function dpois since in the examples I have always found directly "dpois" or "Rcpp::dpois" that both do not work in my code. Could anyone be so patient to explain me why should it be like that? Thaks a lot, Enrico #include <Rcpp.h> using
2017 Aug 05
2
LLVM Vectorisation Bug
I have matrix multiplication and stencil code. I vectorise it through the following command. opt -S -O3 -force-vector-width=2048 stencil.ll -o stencil_o3.ll in both the examples of matrix mult and stencil it vectorises fine when my loop iterations >2048. but if i keep both iterations and vector width=2048. it produces scalar code IR not vectorizes it. Is it llvm bug? Please help me.
2016 Apr 07
2
simple question on data frames assignment
Hello, Or even simpler, without ifelse, colordata$response <- colordata$color == 'blue' + 0 Hope this helps, Rui Barradas ? Citando David Barron <dnbarron at gmail.com>: > ifelse is vectorised, so just use that without the loop. > > colordata$response <- ifelse(colordata$color == 'blue', 1, 0) > > David > > On 7 April 2016 at 12:41, Michael
2024 Jan 17
1
Choices to remove `srcref` (and its buddies) when serializing objects
On 1/16/24 20:16, Dipterix Wang wrote: > Could you recommend any packages/functions that compute hash such that > the source references and sexpinfo_struct are ignored? Basically a > version of `serialize` that convert R objects to raw without storing > the ancillary source reference and sexpinfo. > I think most people would think of `digest` but that package uses >