[R] How to check if a value of a variable is in a list

2011-04-19 Thread Frederik Lang
Hi all, I am working with some social network analysis in R and ran into a problem I just cannot solve. Each observation in my data consists of a respondent, some characteristics and up to five friends. The problem is that all of these five friends might no show up later as a respondent (observa

Re: [R] Incremental ReadLines

2011-04-17 Thread Frederik Lang
thout looping through for next time I have to parse a large file. Many thanks for your help! Frederik On Thu, Apr 14, 2011 at 4:58 PM, William Dunlap wrote: > [see below] > > From: Frederik Lang [mailto:frederikl...@gmail.com] > Sent: Thursday, April 14, 2011 12:56 PM > To: Wi

Re: [R] Incremental ReadLines

2011-04-14 Thread Frederik Lang
Hi Bill, Thank you so much for your suggestions. I will try and alter my code. Regarding the even shorter solution outside the loop it looks good but my problem is that not all observations have the same variables so that three different observations might look like this: Id: 1 Var1: false Var

Re: [R] Incremental ReadLines

2011-04-14 Thread Frederik Lang
Hi Mike, Thanks for your comment. I must admit that I am very new to R and although it sounds interesting what you write I have no idea of where to start. Can you give some functions or examples where I can see how it can be done. I was under the impression that I had to do a loop since my block