Displaying 20 results from an estimated 900 matches similar to: "Matching a character in a string"
2011 Jun 30
1
Match strings across two differently sized dataframes and copy corresponding row to dataframe
Hello-
Sorry, this is a bit of a noob question, but I can't seem to progress
it any further.
I have two dataframes which contain a series of strings which exactly
match. The problem is one has more rows than the other (more cases
have been added) and they have been sorted so that they are not in the
same order. The smaller dataframe, though, contains in another column
which has codes
2004 Nov 24
2
an R function to search on Prof. Baron's site
Inspired by the functions that Barry Rawlingson and Dave Forrest posted for
searching Rwiki and R-help archive, I've made up a function that does the
search on Prof. Baron's site (Thanks to Prof. Baron's help on setting up the
query string!):
RSiteSearch <- function(string, restrict="Rhelp", format="long",
sortby="score",
2003 Aug 26
3
matching-case sensitivity
Hi All,
I am trying to match two character arrays (email lists) using either
pmatch(), match() or charmatch() functions. However the function is
"missing" some matches due to differences in the cases of some letters
between the two arrays. Is there any way to disable case sensitivity or is
there an entirely better way to match two character arrays that have
identical entries but written
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
2002 Oct 22
3
Loading packages at startup
> 4) One problem with saving an R session and then restoring it is that
> the packages in use are not reloaded. Quitting an R session and
> saving could write .Rpackages in the current directory (with the
> library recorded if it were not the default). Then restarting a
> session in that directory would restore the loaded packages
> automatically.
I've been
2006 Mar 07
3
Expanding partial names
I'm writing wrappers for some functions that change some of the default
arguments. I'd rather not list all of the arguments for the low level
functions because there are about a dozen wrapper functions, and about
20 arguments to lowlevel. Instead I'm trying something like this:
lowlevel <- function(longname = 1) {
cat("longname = ", longname, "\n")
}
2010 Jan 22
2
Counting two factors at the same time
Hello.
I'm trying to count string data that correspond to a given
condition in two factors of the same length.
For example, I have one factor
[ 'A', 'B', 'A', 'C', 'B', 'D', 'B' ]
and another is
[ '1', '2', '2', '3', '2', '2', '3' ]
I'd like to count the occurences of
2007 Mar 19
1
Audio makes winecfg segfault
Hello all.
When I start winecfg, everything works ok until I click on the audio tab,
which gives
wine: Unhandled page fault on write access to 0x003ffd80 at address
0x619716c5 (thread 0009), starting debugger...
Wine itself works ok, I have sound; however I think it is in OSS emulation
mode, but I'd like to change it to alsa (I use ala-1.0.12). Xmms works
perfectly in alsa mode, so I
2007 Mar 19
1
Problem with DirectPlay networking
Hello.
I have succeeded in getting Fallout Tactics and Age Of Empire II to start
multiplayer games.
To do so, I had to override dpnhpast for dplaysvr.exe.
I wanted to play multiplayer games with a friend of mine, but on his machine
wine doesn't even load dplaysvr.exe, so he cannot join multiplayer games.
How can he enable dplaysvr.exe?
Thanks.
--
Fabrice DELENTE
2007 Mar 19
1
How to choose the DSP?
Hello.
I have two soundcards (with alsa 1.0.11rc4, and OSS emulation) on my
machine, and I would like to change the one Wine is using; I didn't find
anything in the system.reg, and I believe ~/.wine/config isn't used anymore?
The sound works, but I would like to use /dev/dsp1 instead of (default)
/dev/dsp.
I can't use winecfg, it throws an unhandled exception when I click on the
2007 Jul 09
2
parsing strings
Hi All,
I have strings made up of an unknown number of letters, digits, and
spaces. Strings always start with one or two letters, and always end
with one or two digits. A set of letters (one or two letters) is always
followed by a set of digits (one or two digits), possibly with one or
more spaces between the sets of letters and digits. A set of letters
always belongs to the following set of
2008 Jun 27
1
Similarity matching with probabilities
Hello,
It's just a strange coincidence that someone posted just very recently a
question about matching. I know there are several match function in the base
package (such as match, pmatch, charmatch, and the gsub etc) but I can't
seem to use them wisely to be able to get what I need.
suppose I have the following strings:
"tets"
"estt"
"rtes7"
2006 Sep 06
1
How to get multiple partial matches?
Hi,
I'm very new to R, and am not at all a software
programmer of any sort. I appreciate any help you
may have. I have figured out how to get my data into
a dataframe and order it alphabetically according to a
particular column. Now, I would like to seperate out
certain rows based on partial character matches. Here
is an (extremely) abreviated example of my data set
Probe Ch1
2001 May 08
1
ASCII map?
Is there a way to convert between and integer and a character and vice
versa? For instance
i <- 65;
ch <- intToChar(i); # "A"
i <- charToInt(ch); # 65
or even better
i <- c(65, 66);
ch <- intToChar(i); # c("A", "B")
i <- charToInt(ch); # c(65, 66)
I have tried to do a ASCII map myself, and I figured out that the ASCII
2009 Jan 23
3
Table Modification
I am trying to construct a two-way table where, instead of printing the
two-way frequencies in the table, I would like to print the values of a
third variable that correspond to the frequencies.
For example, the following is easily constructed in R
> fact1 <- factor(sample(LETTERS[1:3],10,replace=TRUE))
> fact2 <- factor(sample(LETTERS[25:26],10,replace=TRUE))
> fact3
2011 Oct 18
1
Function to "lump" factors together?
Sorry about the odd terminology, but I suspect that my intent might be
completely missed had I used "aggregate" or "classify" (each of which
appears to have some rather special meanings in statistical analysis and
modeling).
I have some data about software builds; one of the characteristics of
each is the name of the branch.
A colleague has generated some fairly interesting
2010 Sep 19
3
Repeating values in a list
I have a list that looks like this ...
> have <- list(a=7,b=3,c=1)
> have
$a
[1] 7
$b
[1] 3
$c
[1] 1
and I want to have a simple way to change it to the following without re-typing the values ...
> desire <- list(a=c(7,7),b=c(3,3),c=c(1,1))
> desire
$a
[1] 7 7
$b
[1] 3 3
$c
[1] 1 1
In other words, I need to create the list in desire from the list in have.
In my
2004 Jul 08
7
Problem with the grep function
Let me present to you my problem :
I have a character vector x and I would like to obtain the indices of the
elements of
this vector that yielded exactly a match.
For example, x=nom, pattern="b", I would to obtain 2 because "b" is on the
second position.
First program :
nom <- c("a","b","ab")
grep("b",nom)
2 3
Then I try the
2002 Apr 18
5
Two problems
Hello! Two questions:
1: I have to import a matrix of adjacency from a file of a software that is
not R (for example "bloc notes" of Windows). The problem is that the matrix
is not in the explicit form as
0 1 1
1 0 0
1 0 0
but it is a scattered matrix where in each row there are two nodes that have
a direct path.
The matrix is
a b
a c
b a
c a
For example, the first row
2007 Feb 01
3
Can this loop be delooped?
Hi.
I have the following code in a loop. It splits a vector into subvectors of
equal size. But if the size of the original vector is not an exact multiple
of the desired subvector size, then the first few subvectors have one more
element than the last few. I know that the cut function could be used to
determine where to break up the vector, but it doesn't seem to provide
control over