similar to: text vector clustering

Displaying 20 results from an estimated 400 matches similar to: "text vector clustering"

2003 Feb 21
4
Perl question
I'm working on the installer code, but I don't know Perl well enough. What is a good Perl equivalent of the R statement if ( s %in% c('string1', 'string2', 'string3') ) ... I can do it with if (s == "string1" || s == "string2" || s == "string3") ... but I've got a feeling there's a better way to do it using associative
2004 Dec 02
3
combine two strings
Hello, I would like to combine two strings while using R. For instance, string1 <- "abcde" string2 <- "WXYZ" I'd like to combine string1 and string2 into Sting3; and string3 should be "abcdeWXZY". Would you please tell me how to do it? Thank you very much Ben-Yang [[alternative HTML version deleted]]
2011 May 08
3
%in% operator - NOT IN
Hello everyone, I am attempting to use the %in% operator with the ! to produce a NOT IN type of operation. Why does this not work? Suggestions? > data2[data1$char1 %in% c("string1","string2"),1]<-min(data1$x1) > data2[data1$char1 ! %in% c("string1","string2"),1]<-max(data1$x1)+1000 Error: unexpected '!' in "data2[data1$char1
2005 Jul 04
1
Colors in mtext
I want to assign different colors to different strings using mtext(...). However, when I use something like mtext(text=c("string1","string2","string3"), col=c("black","blue","red"), side=3, line=0) string2 and string3 are printed over string1. When I use paste("string1","string2","string3"), the series
2006 Apr 04
1
Indexing a vector by a list of vectors
Hello R-help - I have vec <- c("string1", "string2", "string3") ind <- list(c(1,2),c(1,2,3)) I want "vec" indexed by each vector in the list "ind". The first element of the list I want would be vec[c(1,2)], the second element would be vec[c(1,2,3)], like the following. [[1]] [1] "string1" "string2" [[2]] [1]
2011 Jun 18
3
how to subtract one string from another in R
Dear R Group Here is what i am trying to do.. but couldnt figure out how.. string<-"ABC DEFG HIJKLM NOPQ RSTUV WXY" string1<-substr(string,1,4) I want to create an R object string 2 ( following the logic shown).. R does not allow string subtraction.. any suggestions how to achieve this? string2<-string-string1 (it should now hold "DEFG HIJKLM NOPQ RSTUV WXY" I
2010 Mar 27
1
string width calculation
Colleagues, I am trying to create a PDF document in which I use margin text with two different fonts. The resulting text might be: XXXXXyZZZ where X and Z are one font and Y is the other. My plan was to do this in the following manner: mtext("XXXXX ZZZ", cex=2, adj=0.5, family=SOMEFONT) mtext("Y", cex=2, adj=??, family=DIFFERENTFONT) My question regards how to calculate
2006 Jun 19
2
fuzzy search
This may be offtopic to Rails, but what are people doing to find records based on fuzzy string matches? For example, if you wanted to find a Person with name "David Heinemeier Hansson" but searched using the string "Dave Hansson". Currently I am find_by_sql that calls the PostgreSQL function "levenshtein(string1, string2)" which returns results with a score
2011 Nov 17
2
how to read a freetext line ?
hi everyone . Here I have a text where there are some integer and string variables.But I can not read them by readLines and scan the text is : weight ;30;130 food:2;1;12 color:white;black the first column is the names of the variables and others are the value of them. the column in different line are different. Can anyone help me ? -- TANG Jie Email: totangjie@gmail.com Tel: 0086-2154896104
2019 Jan 22
3
Samba + BIND9 DLZ. DNS dosen't resolve FQDN, only short hostname
Rowland, thank You, but this removes only the NS record, but the faulty domain A records remain. How to deal with them, I don't know. They behave unlike the ordinary A records. Name=, Records=8, Children=0     SOA: serial=27, refresh=900, retry=600, expire=86400, minttl=3600, ns=blacktux.interbronz.local., email=hostmaster.interbronz.local. (flags=600000f0, serial=27, ttl=3600)     NS:
2012 Apr 19
1
Compare String Similarity
Dear All, I need to estimate the level of similarity of two strings. For example: string1 <- c("depending","audience","research", "school"); string2 <- c("audience","push","drama","button","depending"); The words in string may occur in different order though. What function would you recommend to use
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
2017 Mar 18
5
AD integration not working after move/version
Hi! I am in a bit of trouble, I have moved a samba installation from one virtual host to another keeping the configuration files and filesystems. But during the transition something broke, now windows users are no longer able to access their shares. I think it has to do with the AD integration. I do not know it it because some state is missing on this host related to the AD integration or if
2014 Feb 26
2
OT: Howto to capture taskset output command
Hi all, I am trying to set processor affinity for a specific process using a shell script without result. Script: #!/bin/sh -x cpu_affinity_ok="2" cpu_affinity="taskset -p -c `cat /tmp/test.pid` | awk '{print $6}'" if [ -f /tmp/test.pid ]; then if [ "$cpu_affinity" == "$cpu_affinity_ok" ]; then exit 0 else taskset -p -c 2
2006 Apr 04
5
Database usage technique -- user-specified fields
Hello folks- In one particular app, it would be useful for the customers to be able to specify the significance (and presence) of fields. For example, consider a CONTACTs database. User 1 wants to have phone1, phone2, phone3, and User 2 wants to have 4 address fields. Generically, this could be done by having a CONTACT with, say, 10 strings, 10 integers, etc. The user''s account
2011 Apr 20
2
get cells by the combination of their column and row names
Hi, I have a (correlation) matrix and I want to select a subset of its cells depending on the combination of their column and row names. This illustrates my problem: mtrx <- matrix(c(1,2,3,4,5,6,7,8,9), nrow=3, ncol=3, dimnames = list(c('c132','c432', 'c233'), c('r132','r233', 'r432')))> mtrx r132 r233 r432c132 1 4 7c432 2
2001 Nov 16
6
case conversion and/or string comparison
This is no doubt trivial but after searching the help files and the web, I cannot seem to find it. 1) How do I convert 'hgt' into 'HGT' in R? 2) How should I have used the help facilities to find this? At the end of the day, all I want to do is case insensitive string matching... i.e. 'if ("HGT" == 'hgt') print('this should be true')' I tried
2005 Nov 19
5
help with apply, please
Dear list, I have a problem with a toy example: mtrx <- matrix(c(1,1,0,1,1,1,0,1,1,0,0,1), nrow=3) rownames(ma) <- letters[1:3] I would like to determine which is the minimum combination of rows that "covers" all columns with at least a 1. None of the rows covers all columns; all three rows clearly covers all columns, but there are simpler combinations (1st and the 3rd, or 2nd
2005 Sep 04
1
specification for glmmPQL
Hello All, I have a question regarding how glmmPQL should be specified. Which of these two is correct? summary(fm.3 <- glmmPQL(cbind(response, 100 - response) ~ expt, data = data.1, random = ~ 1 | subject, family = binomial)) summary(fm.4 <- glmmPQL(response ~ expt, data = data.2, random = ~ 1 | subject, family =
2012 Mar 13
1
Visualising multiple response contingency tables
Dear R Help Community, I have a question and an answer (based on reading this forum and online research), but I though I should share both since probably there's a much better way to go about my solution. My question is specifically about how to best visualise multiple response contingency tables. What I mean by 'multiple response' is that the total number of responses per row of a