Re: [R] summing up and cut off with looping

2016-06-10 Thread oslo via R-help
Hi Brent; I do appreciate for your helps and advice. I already registered online to learn R. Today my second day. I think I could not explain my problem precisely. I have two file called A and B. A has to columns say posA and posB the values of the first row in A are 1 and 9, and the values of t

Re: [R] summing up and cut off with looping

2016-06-10 Thread Bert Gunter
1. Please read the posting guide (link below) to learn how to post understandable questions -- at least I was not able to understand. In particular, post in plain text, not html, which tends to get mangled as seemed to occur here. 2. Your first stop in learning R should be one of the many fine tut

[R] summing up and cut off with looping

2016-06-10 Thread oslo via R-help
Hi all; I am quite new in R. I have tried write a loop to sum up a column and cut off when summation reach certain point. Here are a small example and my R codes. Your helps are truly appreciated, Oslo file=AposA posB1     92     75     124     79     13.    . .    .    File=Bpos  a  b   c    4