similar to: count occurrence and distance of characters in string

Displaying 20 results from an estimated 10000 matches similar to: "count occurrence and distance of characters in string"

2010 Jul 07
3
use sliding window to count substrings found in large string
Hello together, I'm looking for advice on how to do some tests on strings. What I want to do is the following: (just an example, real strings/sequence are about 200-400 characters long) given set of Strings: String1 abcdefgh String2 bcdefgop use a sliding window of size x to create an vector of all subsequences of size x found in the set (order matters! ). Now create, for every string
2010 Oct 25
4
zoo.read intraday data
Hello all, I'm trying to use zoo.read but can't figure out how to deal with the time format. (example below) would be nice if someone could help. best regards, Immanuel --------------------------- L <- "Date,Time,Open,High,Low,Close,Up,Down 05.02.2001,00:30,421.20,421.20,421.20,421.20,11,0 05.02.2001,01:30,421.20,421.40,421.20,421.40,7,0
2011 Jun 10
1
ggplot2 avoid automatic color selection
Hey all, I'm trying to replicate some plots with ggplot2. The problem is that I need to specify the color for every attribute (drug). If I use the code below the colors get automatically assigned but I need to plot drug1 in black drug2 in blue etc. How do I do that? q = qplot(days,vol,data = cellLine7064, color = drug, geom = c("line", "point")) best regards, Immanuel
2011 Aug 26
1
kernlab: ksvm() bug?
Hello all, I'm trying to run a gird parameter search for a svm. Therefore I'M using the ksvm function from the kernlab package. ---- svp <- ksvm(Ktrain,ytrain,type="nu-svc",nu=C) ---- The problem is that the optimization algorithm does not return for certain parameters. I tried to use setTimeLimit() but that doesn't seem to help. I suspect that ksvm() calls c code that
2011 Aug 22
1
Threads in R
Hello all, I posted a questions on how to terminate a function call that does not return after a certain time ( I can not modify the function code) some time ago. Since I didn't find a solution I just came up with the idea to run the functions call in a separate thread who I could terminate a will. Would this be possible? Any pointers in the right direction? A looked briefly a snow and Rmpi
2007 Nov 20
2
No longer able to browse windows share via Nautilus
I used to be able to browse the windows shares on the network through Nautilus. I can see them as computers, but when I click on them, it fails. (I'm on Ubuntu 6 LTS, AMD64) About 3 months ago, this failed. But, the windows boxes can all still access my shares on my Linux box. I was going through the trouble shooting, and found this out, but I'm not sure what to do next. I am
2010 Nov 02
2
count different words in a field
Hi all, I started to ask this in the other post, but it is off topis...so here it is again. I have a data.frame (created with the helpof this mail list) that looks like this : 'data.frame': 22801 obs. of 15 variables: $ V1 : chr "HUMUS" "SLABO" "MALO" "SLABO" ... $ V2 : chr "IN" "GRANULIRAN"
2011 Aug 20
1
How to abort function execution after x-seconds
Hello all, I'm running a parameter grid optimization ( ksvm, kernlab package) and the optimizer seems not to converge for certain parameters and stays in a infinity loop. Would it be possible to abort the execution after x-seconds and continue with the next parameter set? Which R function do need to use to accomplish this? I had a look at, try() etc. but they didn't seem so fit my
2011 May 31
1
how to store object without loosing their class property
Hello all, I'm trying to store some objects (class = "svm") , but if I use a list the objects get somehow converted and I can't retrieve them as objects of type "svm". So how to I properly store objects of that kind? best regards ----------- library(e1071) data(iris) attach(iris) ## classification mode # default with factor response: model <- svm(Species ~ .,
2011 Dec 01
2
Counting the occurences of a charater within a string
I am new to R but am experienced SAS user and I was hoping to get some help on counting the occurrences of a character within a string at a row level. My dataframe, x, is structured as below: Col1 abc/def ghi/jkl/mno I found this code on the board but it counts all occurrences of "/" in the dataframe. chr.pos <- which(unlist(strsplit(x,NULL))=='/') chr.count <-
2010 Dec 30
1
recursively count the words occurrence in the text files
I just can't google for it: I'm searching for a "bash" "one liner" (awk, perl, or anything) for this: there are text files, in several directories: mkdir one mkdir two mkdir three echo "word1 word2 word3" > one/asf.txt echo "word2 word4, word5" > one/asfcxv saf.txt echo "word1. word2" > one/dsgsdg.txt echo "word6,
2008 Aug 07
2
List of "occurrence" matrices
R users, I don't know if I can make myself clear but I'll give it a try. I have a data.frame like this x <- "var1,var2,var3,var4 a,b,b,a b,b,c,b c,a,a,a a,b,c,c b,a,c,a c,c,b,b a,c,a,b b,c,a,c c,a,b,c" DF <- read.table(textConnection(x), header=T, sep=",") DF and I would like to sum all the combinations/occurences by a factor (letter in this case) between
2010 Nov 19
1
Set colour in tcl variable
Hello all, using package tcltk this is my problem: I want to set a colour of a tclVar(). I have a tklabel (fixed in position) which should display two variables occasionally. If a constraint is fulfilled, the tklabel should display correct<-tclVar('correct') in green, otherwise it should display wrong<-tclVar('wrong') in red! To display the variables is no
2018 May 23
2
Pasar palabras de una lista a una variable del dataframe
Muchas gracias Carlos, Me da error al hacerlo. Mi variable donde quiero que localice las palabras de la lista tiene más de una palabra, no se si puede ser por eso. Gracias El Mar, 22 de Mayo de 2018, 20:15, Carlos Ortega escribió: > Hola, > > Aquí tienes un ejemplo (reproducible)... > > #----------------------- >> # Generar nombres de mujer >> library(randNames)
2011 Jan 14
9
Selecting the first occurrence of a value after an occurrence of a different value
Hello everyone, I am currently working with some data where I need to select the first occurrence of a value after the occurrence of another value. The data has two columns, one with a time and one with occurence of certain events. The column of data I want to select from looks like this (and each of these events have a corresponding time in another column). Stat71 OutMag FirstResp InMag
2012 Feb 20
1
counting characters starting point
I have three character strings represented below as seq1, seq2, and seq3. Each string has a reference character different from the other. Thus, for seq1, the reference character is U, seq2, S (3rd S from left where A is leftmost character) and for seq3 Y. seq1 = PQRTUWXYseq2 = AQSDSSDHRSseq3 = EEZYJKFFBHO I wish to generate a 3 by 26 matrix where 3 represent seq1, seq2, seq3 and 26 the letters of
2006 Feb 22
2
Ctrl+C does not work in virtual console
Hi all, I have a problem with the virtual console. I run Xen 3.0.1 (compiled from the sources) on debian 3.1 (as dom0 and domU) on an AMD Athlon 64. I can''t terminate programs with ctrl+c. If I try for example to ping a machine, ping runs forever and cannot be stopped from the console. ctrl+z does then not work either. But if I do the same with ssh, everything works fine. There are
2011 Nov 02
3
how to count number of occurrences
Dear R users, I have this data frame, y samp 8 0.03060419 X 18 0.06120838 Y 10 0.23588374 X 3 0.32809965 X 1 0.36007100 X 7 0.36730571 X 20 0.47176748 Y 13 0.65619929 Y 11 0.72014201 Y 17 0.73461142 Y 6 0.76221313 X 2 0.77005691 X 4 0.92477243 X 9 0.93837591 X 5 0.98883581 X 16 1.52442626 Y 12 1.54011381 Y 14 1.84954487 Y
2007 Jul 07
1
Top Ten Female Turn Ons
Top Ten Female Turn Ons When it comes to sexual turn ons, men and women are very different. It is not a myth that women are attracted to a man who is comfortable with his emotions. http://2site.com/epqjag The Truth About Creative Baby Shower Thank You Poems Where are the cutest baby shower thank you poems? Don''t you know the best thank you poems lie somewhere deep in your
2006 Jan 05
4
testing file uploads
Hi all, I was wondering about the class used when rails receives file uploads. Sometimes it appears to be a File, and other times it is a StringIO. Also it has methods such as original_filename that don''t appear to belong to either of these classes. I ask because I''m trying to work out how to test my fil upload related models and controllers. Is there some standardised way of