Here is another approach in R (blatantly stealing Jim Holtman's code
to generate sample data):
> set.seed(1)
> n <- 100
> test <- data.frame(p = sample(10, n, TRUE)
+ , b = sample(10, n, TRUE)
+ )
> test$e <- sample(5, n, TRUE) + test$b # make sure e > b
>
> tmp1 <
Thanks you guys, you are awesome.
-S
On Sun, Jul 20, 2014 at 5:36 PM, John McKown
wrote:
> On Sun, Jul 20, 2014 at 6:33 AM, Ubernerdy wrote:
> > Hello guys!
> >
> > I have been messing around with R for a while now, but this situation has
> > me a bit stumped. I was unable to solve it by readi
On Sun, Jul 20, 2014 at 6:33 AM, Ubernerdy wrote:
> Hello guys!
>
> I have been messing around with R for a while now, but this situation has
> me a bit stumped. I was unable to solve it by reading documentation.
>
> So I have this table (currently in Excel - could export it as csv) with
> values
try this:
> # generate test data
> set.seed(1)
> n <- 100
> test <- data.frame(p = sample(10, n, TRUE)
+ , b = sample(10, n, TRUE)
+ )
> test$e <- sample(5, n, TRUE) + test$b # make sure e > b
> # add distance
> test$dist <- ifelse(test$p < test$b
+
Hello guys!
I have been messing around with R for a while now, but this situation has
me a bit stumped. I was unable to solve it by reading documentation.
So I have this table (currently in Excel - could export it as csv) with
values in 3 columns. Let's call them value P (for position), value B
(
5 matches
Mail list logo