Displaying 3 results from an estimated 3 matches for "aabc".
Did you mean:
abc
2006 Apr 16
1
string vector indices
Hi,
I have a string vector, say,
x <- "a", "aab"
and anther string vector, say,
y <- "a", "aa", "aab", "aabc".
Is there any R function to get the indices of y for the elements of x, that
is, foo(x, y) will give me the index vector c(1, 3)?
I know i can combine apply() and grep("^aab$", y) to do it. But is there any
elegant R function I can use?
Thanks,
-Luke
[[alternative HTML version...
2010 Aug 03
4
mixing strings and numeric doubles in an array
...3 EWST A
2224 7.54688 -0.026210
3 19950331 EWST 10001 3 EWST A
2244 7.50000 0.006377
However when I call the part of the array dealing with the Ticker, I
get:
> stocks[2,2]
[1] EWST
16185 Levels: A AA AAA AAAB AAABB AAB AABC AAC AACB AACC AACE AACI ...
ZVXI
Thus, when I reference this later, I get a numeric result and not the
symbol? Is this because I need to change the format of stocks[,2] or
because it has these extra "levels".
For example:
# START FIRST PORTFOLIO
port1=matrix(0, ctr,3)#matr...
2008 Apr 06
3
Multiset Permutations
...39;, 'C'};
String[] perms = GetPermutations(set);
Arrays.sort(perms, String.CASE_INSENSITIVE_ORDER);
for(int i=0; i<perms.length; i++){
System.out.println(perms[i]);
}
}
}
------------------------- END JAVA CODE -----------------------------
This code prints the following:
AABC
AACB
ABAC
ABCA
ACAB
ACBA
BAAC
BACA
BCAA
CAAB
CABA
CBAA
--
View this message in context: http://www.nabble.com/Multiset-Permutations-tp16529735p16529735.html
Sent from the R help mailing list archive at Nabble.com.