Re: [R] Fast lookup in ragged array

2007-03-17 Thread Seth Falcon
Peter McMahan [EMAIL PROTECTED] writes: That's a good point. What's a good point? [this is why top-posting isn't so helpful]. What's the overhead on digests like that? Depends on the digest algorithm, the implementation, etc. To some extent, you can just try it and see. Or you can

[R] Fast lookup in ragged array

2007-03-16 Thread Peter McMahan
Hello, I'm running an algorithm for graph structural cohesion that requires a depth-first search of subgraphs of a rather large network. The algorithm will necessarily be redundant in the subgraphs it recurses to, so to speed up the process I implemented a check at each subgraph to see if

Re: [R] Fast lookup in ragged array

2007-03-16 Thread Peter McMahan
Well, I hadn't ever seen RBGL before, so that's great. I've been using igraph and sna mainly, but there are a few points lacking between these two. RBGL solves a lot of problems for me! But I'm not sure it will solve this specific problem. Are you suggesting I use RBGL to do a depth-first

Re: [R] Fast lookup in ragged array

2007-03-16 Thread Seth Falcon
Peter McMahan [EMAIL PROTECTED] writes: Well, I hadn't ever seen RBGL before, so that's great. I've been using igraph and sna mainly, but there are a few points lacking between these two. RBGL solves a lot of problems for me! But I'm not sure it will solve this specific problem. Are you

Re: [R] Fast lookup in ragged array

2007-03-16 Thread Peter McMahan
Thanks, I'll give it a try. does R have a limit on variable name length? Also, is it better to over-estimate or under-estimate the size parameter? This won't be too hard to implement, either, as I'm already keeping the list in a specific environment so all the subprocesses can find the

Re: [R] Fast lookup in ragged array

2007-03-16 Thread jim holtman
I just tried it and there seems to be a limit of about 256 characters in a variable name: # worked assign(paste(sample(letters,256,T), collapse=''),123,env=x) # failed at 257 characters assign(paste(sample(letters,257,T), collapse=''),123,env=x) Error in assign(paste(sample(letters, 257, T),

Re: [R] Fast lookup in ragged array

2007-03-16 Thread Seth Falcon
Peter McMahan [EMAIL PROTECTED] writes: Thanks, I'll give it a try. does R have a limit on variable name length? If you are going to have very long names, you might be better off computing a digest of some kind. You could use the digest package to compute an md5sum or the Ruuid package to

Re: [R] Fast lookup in ragged array

2007-03-16 Thread Peter McMahan
That's a good point. What's the overhead on digests like that? Also, does that open up the possibility, exceedingly small though it may be, of misidentifying a branch as already searched and missing a qualifying subgraph? On Mar 16, 2007, at 2:02 PM, Seth Falcon wrote: Peter McMahan