similar to: "ACCTGMX" to "1223400" in R?

Displaying 20 results from an estimated 300 matches similar to: ""ACCTGMX" to "1223400" in R?"

2013 Dec 17
3
In-string variable/symbol substitution: What formats/syntax is out there?
Hi, I'm try to collect a list of methods/packages available in R for doing in-string variable/symbol substitution, e.g. someFcn("pi=${pi}"), anotherFcn("pi=@pi@") and so on becomes "pi=3.141593". I am aware of the following: ** gsubfn() in the 'gsubfn' package, e.g. > gsubfn( , , "pi = $pi, 2pi = `2*pi`") [1] "pi = 3.14159265358979,
2017 Jul 13
2
Help with R script
Using Ulrik?s example data (and assuming I understand what is wanted), here is what I would do: ex.dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3") tst <- data.frame(x = ex.dat, stringsAsFactors=FALSE) sp <- strsplit(tst$x, ':', fixed=TRUE) chk <-
2015 Feb 03
2
[LLVMdev] RFC: Constant Hoisting
I've had a bug/pessimization which I've tracked down for 1 bit bitmasks: if (((xx) & (1ULL << (40)))) return 1; if (!((yy) & (1ULL << (40)))) ... The second time Constant Hoisting sees the value (1<<40) it wraps it up with a bitcast. That value then gets hoisted. However, the first (1<<40) is not bitcast and gets recognized as a BT. The second
2017 Jul 14
0
Help with R script
@Don your solution does not solve Vijayan's scenario 2. I used spread and gather for that. An alternative solution to insert mising Fval - picking up with Don's newtst - is newtst <- c("FName: fname1", "Fval: Fval1.name1", "FName: fname2", "Fval: Fval2.name2", "FName: fname3", "FName: fname4", "Fval: fval4.fname4")
2010 Sep 14
4
Error: cannot allocate vector of size X.0 Mb
Hi, I am working with a file (900MB in size) that has around 10 million records (in particular FASTQ records). I am able to read in the file as an object of BStringSet. When I start to manipulate the data, after almost 4 hours, I get the error message as Error: cannot allocate vector of size X.0 Mb (where X was once 160MB and then 180MB). The R version used is 2.11.1. I am not sure how to check
2015 Feb 03
3
[LLVMdev] RFC: Constant Hoisting
Hi Chris, If you have everything setup to test, can you generate the LLVM IR with -03 from 3.4.1 and 3.5 to be sure they match. Then we can focus on the backend. Thanks, Mehdi > On Feb 3, 2015, at 1:58 AM, Chris Sears <chris.sears at gmail.com> wrote: > > So between 3.4.1 and 3.5 since it isn't in 3.4.1 and it is in the current XCode. -------------- next part
2015 Feb 03
2
[LLVMdev] RFC: Constant Hoisting
> On Feb 3, 2015, at 10:20 AM, Chris Sears <chris.sears at gmail.com> wrote: > > I was using this GCC compiler comparison site. It's well done but unfortunately it's not up to date. The author Matt Godbolt said he was updating it: > > http://gcc.godbolt.org/# <http://gcc.godbolt.org/#> > > No, I do not have 3.4.1 but 3.5 is the current XCode release.
2004 Dec 29
6
numeric(0)
Dear all, I am trying to calculate a score for a string sequence consisting of the following four letters: ACGT. I have got a matrix giving the scores for each pair of letters. So for example the string ACCT has got the pairs: AC, CC and CT. The matrix has got the following form: names<-c("A","C","G","T"); mscore<-matrix(0,4,4);
2005 May 07
4
string syntactic sugar in R? - long post
Currently in R, constructing a string containing values of variables is done using 'paste' and can be an error-prone and traumatic experience. For example, when constructing a db query we have to write, paste("SELECT " value " FROM table where date ='",cdate,"'") we are getting null result from it, because without (forgotten...)
2002 Jan 19
2
comma as decimal separator in plots
Hi, Some time ago I asked about how to use comma as decimal separator in plots and Mr. Paul Murrell wrote: ------- You could try something with axis() and chartr(), like ... par(mfrow=c(2,1)) plot(1:10/11, rep(1, 10), main="Standard X-Axis") plot(1:10/11, rep(1, 10), main="Customised X-Axis", axes=F) axis(1, at=pretty(1:10/11),
2009 Apr 08
1
Colour each letter of a text string in a plot
I am inserting a DNA sequence into a plot, and hope to colourize each of the four nucleotide of the DNA sequence with a unique colour i.e., A ("red"), C ("green"), G ("blue", and T ("yellow"). I use the following codes, but the DNA sequence only shows as "red" DNA <- "ACGT" plot(1, xlim = c(0,1), ylim = c(0,1), axes=F,
2020 Feb 03
2
Error de caracteres al ejecutar un script en Windows
Buenas tardes, Tengo un problema al ejecutar un script de R desde la consola de Windows 8.1. El código desde RStudio funciona perfectamente, pero al ejecutarlo desde la consola peta al hacer una cambio de caracteres. El error que da en la consola es: Error in chartr("áéíóúà èìòùâêîôû", "aeiouaeiouaeiou", xpeliculas) : 'old' es más largo que
2004 Jul 29
3
Editing Strings in R
I was wondering if there is a way of editting strings in R. I have a set of strings and each set is a row of numbers and paranthesis. For example the first row is: (0 2)(3 4)(7 9)(5 9)(1 5) and I have a thousand or so such rows. I was wondering how I could get the corresponding string obtained by adding 1 to all the numbers in the string above. Dursun [[alternative HTML version deleted]]
2017 Oct 11
6
changing "," to "." in data.frame
Dear friends - I have a data.frame with "," instead of "." and found the discussion http://r.789695.n4.nabble.com/How-to-replace-all-commas-with-semicolon-in-a-string-tt4721187.html#a4721192 so copying the code of Ulrik(I hope:-)) I tried (making some data) AX <-
2017 Jul 13
0
Help with R script
Hi Vijayan, one way going about it *could* be this: library(dplyr) library(tidyr) library(purrr) ex_dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3") data.frame(x = ex_dat) %>% separate(x, c("F1", "F2"), sep = ": ") %>% filter(F2
2003 May 22
4
grep, gsub, sub have problems with NA values (PR#3078)
In a string context, grep, gsub, sub are improperly treating NA (missing) as the string "NA", and returning unexpected results > grep("A", c(NA,"NA")) [1] 1 2 # expected: # [1] 2 > gsub("A", "X", c(NA,"NA")) [1] "NX" "NX" # expected # [1] NA "NX" > sub("A", "X",
2010 Mar 19
5
Encrypt/decrypt in R
Hi all, Does any one know of any encryption/decryption algorithms in R? I'm not looking for anything robust - I want some way of printing output to the screen that the user can't read immediately, but can decrypt a little later. The main thing I don't want to the user to see is a number, so (e.g.) ROT13 isn't appropriate. Hadley -- Assistant Professor / Dobelman Family Junior
2004 Oct 07
2
two help problems in R-2.0.0 for Windows (PR#7269)
R-2.0.0, WinNT / WinXP: options(chmhelp=TRUE) ?dnorm # does not work! ?Normal # works! Looks like calling compiled html help does not work for aliases, but only for the title of help pages... And a quick fix without changing the design is to change lines 136-137 in .../src/library/utils/R/help.R as follows: - err <- .C("Rchtml", hlpfile, topic, - err =
2017 Jul 13
2
Help with R script
Dear R-help Group Scenario 1: I have a text file running to 1000 of lines...that is like as follows: [922] "FieldName: Wk3PackSubMonth" [923] "FieldValue: Apr" [924] "FieldName: Wk3PackSubYear" [925] "FieldValue: 2017" [926] "FieldName: Wk3Code1" [927] "FieldValue: " [928] "FieldValue: K4" [929] "FieldName:
2011 Aug 30
2
url prep function (backslash issue)
Greeting R Community, I am a windows user so this problem may be specific to windows. I often want to source files from within R such as: C:\Users\Rinker\Desktop\Research & Law\Data\School Data 09-10. To source this file I need to go through the path and replace all the backslashes (\) with forward slashes (/). I usually do this in MS Word using the replace option, however, I'd like