search for: longest

Displaying 20 results from an estimated 602 matches for "longest".

2009 Apr 10
3
Determine the Length of the Longest Word in a String
Hi Everyone, I'm new to programming R and have accomplished my goal, but feel that there is probably a more efficient way of coding this. I'd appreciate any guidance that a more advanced programmer can provide. My goal -- I would like to find the length of the longest word in a string containing many words separated by spaces. How I did it -- I was able to find the length of the longest word by parsing the string into a list of separate words, using the function "which.max" to determine the element with the longest length, and then using "nchar&q...
2012 Nov 02
2
Determine longest run of number
Does anybody know a way to determine the longest run of a number in a vector of numbers? For example if I have the following numbers: 0 0 1 1 1 1 0 1 1 0 0 0 1 1; how can I determine that the longest run of 1's = 4 and longest run of 0's = 3? Thanks, Mark
2007 Dec 27
1
A function for random test based on longest run (UNCLASSI FIED)
Classification: UNCLASSIFIED Caveats: NONE Thanks for your quick response. The program you mentioned below available from R is based on number of runs (up or down) not based on a longest length of runs of same events. To be more specific, for example, from a series, HHTHTTTTHHH, the number of runs are 5, and the longest length of runs of the same events is 4. I'll check for the website you mentioned below. Kyong -----Original Message----- From: bogdan romocea [mailto:br44114...
2003 May 07
2
Extracting the longest entry
I have a matrix with NAs and want to extract the longest column. > is.matrix(foo) [1] TRUE > dim(foo) [1] 2000 75 > GetLength <- function(x) {length(na.omit(x))} > junk <- apply(foo, 2, GetLength) > junk [1] 1004 512 432 523 691 396 607 838 [9] 730 389 388 445 609 333 637 1024 [17] 1163 823 718 466 799 459 70...
2007 Dec 27
2
A function for random test based on longest run (UNCLASSIFIED)
Classification: UNCLASSIFIED Caveats: NONE Hello, R users, Has anybody written a function for random test based on the length of longest run of same events. I really appreciate your help. Kyong Park Classification: UNCLASSIFIED Caveats: NONE [[alternative HTML version deleted]]
2009 Oct 28
1
Need help locating the longest series of consecutive numbers in a matrix
I need to determine the length of the longest series of consecutive numbers (1's to be specific) and the start time of that series. For example, in the following sample, the first column is "time" and the second column indicates the presence of the target behavior. I would like a function that would return "21" as the...
2002 Aug 23
1
Legends and Fonts
Hello. Is it possible to set specify the font used by legend()? I would like to specify a fixed-width font so that I can line up parts of vertically stacked curve labels. For example, it would be nice if I could align the names, ages, and weights in the following three curve labels: Bob age=7 weight=100 Alexander age=13 weight=150 Susan age=20 weight=130 Is there perhaps a clever
2012 Dec 18
3
[LLVMdev] Getting rid of tabs in LLVM's assembly output?
...d be best to look at some smart column-padded > formatting than use a constant tab -> N spaces replacement. I'll see > if this is something I can get to. > > Maybe it's naive, but I would expect it to be easy for each backend to expose a constant N which is the length of the longest mnemonic, and then for the printer to pad to N+1 or N+2…. That would probably work for X86, but other targets (ARM in particular) often have operands which are printed/parsed as suffices on the mnemonic itself. Because of these, the backend does not statically know the longest potential string-of...
2004 Feb 10
1
Longest known unpatched FreeBSD security issue ?
Does anyone know off hand what the longest known serious security issue (i.e. remote compromise) has been with FreeBSD that went unpatched ? e.g. security hole is reported to security-officer@FreeBSD.org. X days later, fix and advisory committed. What has been the largest X ? My jaw dropped when I saw http://www.eeye.com/html/Researc...
2006 Jan 10
5
matching country name tables from different sources
Hi, Before I reinvent the wheel I wanted to kindly ask you for your opinion if there is a simple way to do it. I want to merge a larger number of tables from different data sources in R and the matching criterium are country names. The tables are of different size and sometimes the country names do differ slightly. Has anyone done this or any recommendation on what commands I
2006 Oct 04
1
RODBC: longest string is truncated
Hello R community: I'm encountering unexpected behaviour as I download string data from MySQL using the RODBC package. The unexpected behaviour is that the last character of the string is truncated. As far as I can see, this happens when some strings are of length 501 or more. Here's how to reproduce this behaviour. ## In MySQL, pick a database and run this: CREATE TABLE test ( v1
2006 Feb 26
0
Help getting The Longest Journey to run.
...you want to start. I have access to the source code for this game, but virtually no experience with Wine. If someone wants to make the game run, I can help out with that, answer questions about it, look at source, etc. or even make patches. There's a freely downloadable demo on http://www.longestjourney.com/download/demo/ (uses the exact same code as the game), so no need to buy it, either. If you're interested, send me an email. Enno. -- A casual stroll through a lunatic asylum shows that faith does not prove anything. - Friedrich Nietzsche
2010 Nov 20
3
Installing Dreamfall: The Longest Journey - help needed!
Hi guys, I'm trying to make this game work following HowTo that I found here: http://appdb.winehq.org/objectManager.php?bShowAll=true&bIsQueue=false&bIsRejected=false&sClass=version&sTitle=&sReturnTo=&iId=5305 But after installing it and trying to run the game an error pops out saying "Failed to initialize Direct3D. Aborting." I don't know how to fix
2008 Feb 29
1
Scruffy Stacked Bar Chart
Hi- Trying to do a stacked bar chart, but nothing is rendering when I add more then 1 bar: This works: graph = Scruffy::Graph.new(:title => "My Chart") graph.add :stacked do |stack| stack.add(:bar, ''Stack1'', [10,10]) end This doesn''t: graph = Scruffy::Graph.new(:title => "My Chart") graph.add :stacked
2009 Oct 01
1
Help me replace a for loop with an "apply" function
...if that is possible My task is to find the longest streak of continuous days a user participated in a game. Instead of writing an sql function, I chose to use the R's rle function, to get the longest streaks and then update my db table with the results. The (attached) dataframe is something like this: day user_id 2008/11/01 2...
2018 Jun 26
2
Asterisk not matching longest prefix with include
On Tue, Jun 26, 2018 at 7:28 PM, Doug Lytle <support at drdos.info> wrote: > On 06/26/2018 07:20 PM, Dovid Bender wrote: > > Doug, > > I tried that as well. Even with my dialplan looking like this: > > > > Ordering by includes works for me under Asterisk 11 and 13 > > What does the output of the below show? > > dialplan show from-external > >
2010 Jun 04
2
Argument recycling in substring()
Hi, According to its man page substring() "expands (its) arguments cyclically to the length of the longest _provided_ none are of zero length". So, as expected, I get an error here: > substring("abcd", first=2L, last=integer(0)) Error in substring("abcd", first = 2L, last = integer(0)) : invalid substring argument(s) But I don't get one here: > substr...
2023 Jun 01
1
bug in na.contiguous? Doesn't give the first tied stretch if it is at the start
Hi. The description of na.contiguous says: "Find the longest consecutive stretch of non-missing values in a time series object. (In the event of a tie, the first such stretch.)" But this seems not to be the case if one of the tied longest stretches is at the start of the sequence/series. In the following example, there are three stretches of...
2006 Jan 27
3
OT?: International number parsing
...at about city codes and local numbers? Is it possible for a concatenated city code and local number to match another city code in the same country? I already have the table of country and city codes built. Are there holes in this theory; 1. Starting after the international dialing code, find the longest match for country code. 2. Starting after the country code from step 1, find the longest match for city code within that countries table of city codes. 3. The rest is the local number. Are there known exceptions? Am I reinventing the wheel rather than finding the right already existing resource?
2009 Sep 03
9
Rails 2.3.3 has a very serious performance problem
...19018 2103.2 18009 23015 Waiting: 17349 19003 2102.6 17994 22995 Total: 17359 19329 2174.6 18023 23026 Percentage of the requests served within a certain time (ms) 50% 18023 66% 18983 75% 21126 80% 22880 90% 23026 95% 23026 98% 23026 99% 23026 100% 23026 (longest request) ============================================ When I put rails 2.2.2 under vendor/rails: Server Software: WEBrick/1.3.1 Server Hostname: 210.77.27.169 Server Port: 3000 Document Path: / Document Length: 7466 bytes Concurrency Level: 1 Time tak...