search for: rheannon

Displaying 6 results from an estimated 6 matches for "rheannon".

Did you mean: hannon
2008 Jul 09
2
rollmean()
...eat along columns, but how do I perform this same action on my rows? The data is a matrix of 365 columns (days of the year) by 5,000 rows (lat/long coordinates). I would like to perform a 31 day running mean along the 365 days. I am new to R so any help would be greatly appreciated! Thanks alot, Rheannon -- View this message in context: http://www.nabble.com/rollmean%28%29-tp18366044p18366044.html Sent from the R help mailing list archive at Nabble.com.
2008 Jul 15
2
Row Sum, exclude positive values
Hello, I'd like to sum the values of a row from the first negative number (FN) to the last negative number (LN), but not add any positive values to the sum. Then apply this to each row of the data frame. For example if I have a dataframe with Row 1 values DF = (4, 3, 2, 1, 0, -1, -2, -3, -2, 2, 1, -1, -2, -3, -2, -1, 1, 2) I would like to sum the numbers from column 6 to column 16, but not
2008 Jul 11
1
While loop
...j <- 1 while (Matrix[i, j] > 0) i = (i + 1) #loop until matrix [i, j] value <= 0 #strore that row number in a variable Start <- i I am getting a scripting out of bounds error and I suspect maybe the loop isnt stoping at the end of the matrix? Any help is greatly appreciated! Cheers, Rheannon -- View this message in context: http://www.nabble.com/While-loop-tp18408462p18408462.html Sent from the R help mailing list archive at Nabble.com.
2008 Jul 23
3
sum each row and output results
Hello, I have the following data frame (DF): V5 V5.1 V5.2 V5.3 V5.4 V5.5 2 -5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677 -6498.7183 3 -5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677 -6498.7183 4 -5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677 -6498.7183 5 -5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677
2008 Jul 21
4
how to speed up this for loop?
Could anyone tell me a better way to achieve the output of this for loop? It seems to run quite slow. I'm sure there must be a more consise way to sum from FN to LN, excluding positive values, for each row. #sum between FN and LN, excluding positive values for(i in 1:R){ for(j in FN[i]:LN[i]){ if(Temp[i,j]<0) sum[i] <- sum[i] + sum(Temp[i,j])}} Cheers, R -- View this message in
2008 Jul 14
2
long data frame selection error
Hello, I am trying to select the following headers from a data frame but when I try and run the command it executes halfway through and give me an error at V188 and V359. Temp <- data.frame(V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, V43, V44, V45,