search for: searchvector

Displaying 2 results from an estimated 2 matches for "searchvector".

2011 Mar 31
3
choosing best 'match' for given factor
...ot;, "L", "O"))) > a A X L O A 1.00 0.41 0.58 0.75 X 0.41 1.00 0.60 0.86 L 0.58 0.75 1.00 0.83 O 0.60 0.86 0.83 1.00 And I have a search vector of variables > v <- c("X", "O") I want to write a function bestMatch(searchvector, matchMat) such that for each variable in searchvector, I get the variable that it has the highest match to - but searching only among variables to the left of it in the 'matching' matrix, and not matching with any variable in searchvector itself. So in the above example, although "X&...
2012 Sep 16
1
possible TZ bug in parseISO8601 - "Error in if (length(c(year, month, day, hour, min, sec)) == 6 && c(year, : [...]"
...ning R intensively the last two weeks and gone from newbie status to *reasonably* comfortable with it. Here's an issue I just cannot solve however as it appears to be some kind of bug in R itself. But I won't claim that for sure. I have a function as follows: FindHighRow <- function(searchVector, highColumnIndex, thisDate, nextDate) { dateFilter <- GetDateRangeString(thisDate,nextDate) filtered <- searchVector[dateFilter] returnRow <- filtered[which.max(filtered[,highColumnIndex])] returnRow } Running the lines BY HAND works fine. But as soon as I call it as a function...