search for: tp4536224p4536275

Displaying 2 results from an estimated 2 matches for "tp4536224p4536275".

Did you mean: tp4536224p4536224
2012 Apr 05
2
how to compute a vector of min values ?
Hi, I'd like to know how to get a vector of min value from many vectors without making a loop. For example : >v1 = c( 1, 2, 3) > v2 = c( 2, 3, 4) > v3 = c(3, 4, 5) > df = data.frame(v1, v2, v3) > df v1 v2 v3 1 1 2 3 2 2 3 4 3 3 4 5 > min_vect = min(df) > min_vect [1] 1 I 'd like to get min_vect = (1, 2, 3), where 1 is the min of v1, 2 is the min of v2
2012 Mar 25
2
avoiding for loops
I have data that looks like this: > df1 group id 1 red A 2 red B 3 red C 4 blue D 5 blue E 6 blue F I want a list of the groups containing vectors with the ids. I am avoiding subset(), as it is only recommended for interactive use. Here's what I have so far: df1 <- data.frame(group=c("red", "red", "red", "blue",