similar to: Mapping strings to integers

Displaying 20 results from an estimated 10000 matches similar to: "Mapping strings to integers"

2007 Jan 30
2
Permutation problem
Dear R-Users, I need a matrix containing line by line all possible permutations with length 'i' of the integers 1:N, given the restriction that the integers in each row have to be in ascending order. For example: N = 5, length i = 3, should result in a matrix like this: 1 2 3 1 2 4 1 2 5 1 3 4 1 3 5 1 4 5 2 3 4 2 3 5 2 4 5 3 4 5 I'm grateful for any advice on
2002 Jul 22
3
Vector Manipulation
Greetings, I wonder if someone could point me towards a more elegent solution than what I"ve kluged together. I have a vector "samp1" of 296 integers. They are sorted in ascending order and the numbers range from 177 to 228,953. I'd like to specify N non-overlapping intervals covering the range from 0 to 229,354 and then for each range, count the number of integers from samp1
2011 Jun 15
2
Count occurances in integers (or strings)
Hi, I have a dataframe column from which I want to calculate the number of 1's in each entry. Some column values could, for example, be "0001001000" and "11110000111". To get the number of occurrences from a string I use this: sum(unlist(strsplit(mydata[,"my_column"], "")) == "1") However, as my data is not in string form.. How do I convert
2004 Dec 23
1
searching Jonathan Baron's R Site
First, my site will be down December 27-28 because of a network upgrade at Penn. It will also be down at least one day before that, while I upgrade the operating system. (And another day some time in January because of a planned power outage.) Second, I have replaced the search engine in my R site: http://finzi.psych.upenn.edu/ I am now using Namazu instead of HtDig. The direct link to the
2011 May 12
1
extract integers from string
I have a vector with a long list of sentences that contain integers. I would like to extract the integers in a manner such that they are separate and manipulatable. for example: x[i] <- "sally has 20 dollars in her pocket and 3 marbles" x[i+1] <- "30 days ago john had a 400k house" all sentences are different and contain a mixture of both integers and characters. i
2011 Feb 09
3
[LLVMdev] Lowering "memcpy" intrinsic function on ARM using LDMIA/STMIA
Hi, llvm emits code for "memcpy" on ARM as consecutive ldr/str commands, and further combines them into ldm/stm with special pass after register allocation. But ldm/stm commands require registers to go in ascending order, what is often not so after regalloc, therefore some str/ldr commands. For example such code: struct Foo {int a, b, c, d; } void CopyStruct(struct Foo *a, struct
2011 Feb 09
0
[LLVMdev] Lowering "memcpy" intrinsic function on ARM using LDMIA/STMIA
On Wed, Feb 9, 2011 at 5:02 AM, Vasiliy Korchagin <vasiliy.korchagin at gmail.com> wrote: > Hi, > > llvm emits code for "memcpy" on ARM as consecutive ldr/str commands, and Hmm, this happens elsewhere as well (x86?). Perhaps what we need is a switch to disable memset/memcpy lowering? > further combines them into ldm/stm with special pass after register >
2003 Jan 14
4
density plot - beginner's question
Hi, I am trying to plot densities given on a two dimensional grid. My data is in the an external file, and is arranged in three columns: x, y, density how may i get a plot of this? i would like to get (1) a three dimensional plot and (2) a color coded two dimensional plot. I have tried using image(x, y, density) but i am asked to put the data in ascending order. i am not sure how i may
2011 Feb 09
3
[LLVMdev] Lowering "memcpy" intrinsic function on ARM using LDMIA/STMIA
09.02.2011 18:57, Jason Kim пишет: > On Wed, Feb 9, 2011 at 5:02 AM, Vasiliy Korchagin > <vasiliy.korchagin at gmail.com> wrote: >> Hi, >> >> llvm emits code for "memcpy" on ARM as consecutive ldr/str commands, and > > Hmm, this happens elsewhere as well (x86?). Perhaps what we need is a > switch to disable memset/memcpy lowering? > Do you
2011 Feb 09
0
[LLVMdev] Lowering "memcpy" intrinsic function on ARM using LDMIA/STMIA
-fno-builtin is the flag you want. deep On Wed, Feb 9, 2011 at 10:18 PM, Корчагин Василий <vasiliy.korchagin at gmail.com> wrote: > 09.02.2011 18:57, Jason Kim пишет: >> On Wed, Feb 9, 2011 at 5:02 AM, Vasiliy Korchagin >> <vasiliy.korchagin at gmail.com>  wrote: >>> Hi, >>> >>> llvm emits code for "memcpy" on ARM as consecutive
2010 Jun 10
2
adding column of ordered numbers to matrix
Hello everyone, I have a matrix of over 40000 line and about 30 columns. For my analysis I would like to add another column with ascending numbers (column header should be "order", and than 1,2,3,4 ....the end of the matrix). During my analysis I reorder them ( due to merge commands by a different column). How do I add such a column in an ascending order (or descending for what it
2009 Jan 23
2
Plot, lines and disordered x and y
Hello, I have 2d data where x coordinate is not given in usual ascending order (x1,...,x1+l; l>0), and instead in another, regular, but not ascending or descending order (for illustration: x1,-x1,x1+dx1,-x1-dx1,....).y is an array which corresponds to the way x is ordered. I have noticed that giving 'plot(x,y,type='l') produces a plot where the points are connected in a completely
2007 Nov 18
1
how to sort a data.frame by ascending some columns
Dear list, I have a data frame (238304 rows and 6 columns). I want the data frame sorted by two columns in ascending order. I am showing the first 5 rows of the data frame > clones.info[1:5,1:6] USER_CLONE_ID CHROMOSOME Expr1002 KB_POSITION Allele_A WELL_ID 1 SNP_A-1855402 17 41419603 41419603 C rs17572851 2 SNP_A-4249904 17 41420045 41420045 A rs17572893 3 SNP_A-2174835 18 41407760
2002 Mar 29
2
order()
Hi, In the order() help file, there is an example like: a <- c(4, 3, 2, NA, 1) b <- c(4, NA, 2, 7, 1) z <- cbind(a, b) (o <- order(a, b)); z[o, ] How can I do something like "order a in ascending order, b in descending order"? And say I have a third vector c, and I'd like to add this to the previous condition "a ascending, b descending, c
2016 Feb 22
2
Re: [PATCH v2 4/4] v2v: in-place: request caps based on source config
On Sat, Feb 20, 2016 at 11:26:10AM +0300, Roman Kagan wrote: > In in-place mode, the decisions on which interfaces to use are made and > the source configuration is created by the outside entity. So in that > case v2v needs to look it up in the source configuraion, and try to > follow. > > For that, the source configuration is used to populate requested caps > object which
2013 Apr 24
2
Sum up column values according to row id
Dear All, here a problem I think many of you can solve in few minutes. I have a dataframe which contains values of plot id, diameters, heigths and basal area of trees, thus columns names are: id | dbh | h | g head(ipso, n=10) id dbh h g 1 FPE0164 36 13.62 0.10178760 2 FPE0164 31 12.70 0.07547676 21 FPE1127 57 18.85 0.25517586 13 FPE1127 39 15.54 0.11945906 12 FPE1127
2011 Apr 05
2
Problem with conversion array of strings to array of arrays of integers
Hi Is it possible to convert array like this ["0", "1", "2", "1,2", "3", "1,3", "1,2,3,4,5,6,9"] to this [[0], [1], [2], [1,2], [3], [1,3], [1,2,3,4,5,6,9]] (all should be int) Any help will be very appreciated couse I''ve really stucked with this. Thanks in advance, Bartek Iwaszkiewicz -- You received this
2011 May 01
2
bwplot in ascending order
Can anyone point me to examples with R code where bwplot in lattice is used to order the boxes in ascending order? I have found the following discussion and it partly works. But, I have a conditioning variable, so my example is more like bwplot(var1 ~ var2|condition, dat) Th example in the discussion below works only when there is not a conditioning variable as far as I can tell. I can tweak the
2006 Sep 22
1
Variable as color in a barplot
Dear wise ones, I have a problem assigning different colors to bars in a barplot. The data I'm using is the following dataframe (truncated) : > L0 r n p t [...] 18 19 1 1 RFM 19 20 1 1 RFM 20 21 2 1 RFM 21 23 6 1 RIH 22 24 2 1 ROC 23 25 1 1 ROC 24 26 1 1 ROC 25 27 2 1 ROC 26 28 2 1 RFT 27 29 1 1 RFT 28 30 2 1 RFT 29 31 1 1 ROH [...] My barplot should
2011 Aug 04
3
persp()
Hello I am trying to draw a basic black and white map of two European countries. After searching some key words in google and reading many pages I arrived to the conclusion that persp() could be used to draw that map. I have prepared three small example files, which are supposed to be the files required for running that function. xvector is a vector with the longitudes yvector is a vector with