search for: rcoder

Displaying 20 results from an estimated 21 matches for "rcoder".

Did you mean: coder
2008 Jul 27
4
product of successive rows
Hi everyone, I want to perform an operation on a matrx that outputs the product of successive pairs of rows. For example: calculating the product between rows 1 & 2; 3 & 4; 5 & 6...etc. Does anyone know of any readily available functions that can do this? Thanks, rcoder -- View this message in context: http://www.nabble.com/product-of-successive-rows-tp18681259p18681259.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 12
7
ignoring zeros or converting to NA
...n of zeros and NAs. When I perform certain calculations on the matrix, the zeros generate "Inf" values. Is there a way to either convert the zeros in the matrix to NAs, or only perform the calculations if not zero (i.e. like using something similar to an !all(is.na() construct)? Thanks, rcoder -- View this message in context: http://www.nabble.com/ignoring-zeros-or-converting-to-NA-tp18948979p18948979.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 13
3
conditional IF with AND
...eby the statement is true when condition 1 AND condition 2 are met: code structure: if ?AND? (a[x,y] <condition1>, a[x,y] <condition2>) I've trawled through the help files, but I cannot find an example of the syntax for incorporating an AND in a conditional IF statement. Thanks, rcoder -- View this message in context: http://www.nabble.com/conditional-IF-with-AND-tp18966890p18966890.html Sent from the R help mailing list archive at Nabble.com.
2008 Jul 09
2
shifting data in matrix by n rows
...I have some data in a matrix, and I want to shift it down by one row. The matrix in question has a date column. Does anyone know of a way to shift the data by one row, whilst preserving the date column in the matrix - i.e. shift the data and leave the date column in the current location? Thanks, rcoder -- View this message in context: http://www.nabble.com/shifting-data-in-matrix-by-n-rows-tp18368420p18368420.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 15
2
cor() btwn columns in two matrices - no complete element pairs
...) } #Code end ...but I get the following error message: Error in cor(mat1[,i], mat2[,i], use="complete.obs") : no complete element pairs Is there something I'm not including in the 'cor' parentheses? I apologise for not including the true original data frames. Thanks, rcoder -- View this message in context: http://www.nabble.com/cor%28%29-btwn-columns-in-two-matrices---no-complete-element-pairs-tp18998875p18998875.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 13
2
missing TRUE/FALSE error in conditional construct
...s and zeros## for (j in 1:5000) { for (k in 1:2000) { if(mat[j,k]!=0 & !is.NaN(mat[j,k])) {mat_zeroless[j,k]<-mat[j,k]} } } ##Code End Error in if (mat[j,k] !=0 & !is.NaN(mat[j,k])) { :missing value where TRUE/FALSE needed I'm not sure how to resolve this. rcoder -- View this message in context: http://www.nabble.com/missing-TRUE-FALSE-error-in-conditional-construct-tp18972244p18972244.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 08
1
increment size in for loop
Hi everyone, Is there a way to vary the increment size in a for loop? For e.g. when incrementing in steps greater than unity. Thanks, rcoder -- View this message in context: http://www.nabble.com/increment-size-in-for-loop-tp18893893p18893893.html Sent from the R help mailing list archive at Nabble.com.
2008 Jul 29
1
correlation between matrices - both with some NAs
...which contain NAs. I am doing the following: a<-cor(m1, m2, use="complete.obs") ... and I get the following error message: Error in cor(m1, m2, use = "complete.obs") : no complete element pairs Does anyone know how I can apply a correlation, ignoring any NAs? Thanks, rcoder -- View this message in context: http://www.nabble.com/correlation-between-matrices---both-with-some-NAs-tp18721853p18721853.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 13
2
merging data sets to match data to date
...matrix with row names (dates) that I want to extract from the full data set. I have then performed a merge to try to o/p rows corresponding to common dates to a results matrix, but the operation did not fill the results matrix. Coulc anyone offer any advice to assist with this operation? Thanks, rcoder -- View this message in context: http://www.nabble.com/merging-data-sets-to-match-data-to-date-tp18962197p18962197.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 02
1
problem with nested loop for regression
...(j in 1:5) #1st nested loop { PmatWt[j,]<-Pmult[j,]*mult_col[j,] } #rolling regression analysis... for (k in 1:maxcol) #2nd nested loop { sel_col<-PmatWt[,k] if(!all(is.na(sel_col))) {Preg[,k]<-coef(lm(tt~sel_col))} } } #Code End Thanks, rcoder -- View this message in context: http://www.nabble.com/problem-with-nested-loop-for-regression-tp18792841p18792841.html Sent from the R help mailing list archive at Nabble.com.
2008 Jul 29
1
rolling regression between adjacent columns
...reference the columns in the regression function using rollapply(), the columns are not recognised and the regression breaks down. Is there a more robust way to reference the columns I need, so that I can apply the regression across the matrix; 'by.column', but every other column? Thanks, rcoder -- View this message in context: http://www.nabble.com/rolling-regression-between-adjacent-columns-tp18722392p18722392.html Sent from the R help mailing list archive at Nabble.com.
2008 Jul 31
1
rollapply() to portions of a matrix
...certain row in the matrix: i.e. it applies from the top, as instructed by the statement, but only to a certain row in the matrix. Can anyone suggest a way to do this using the additional arguments in the parentheses? One way would be to introduce an if statement, but is this the only way? Thanks, rcoder -- View this message in context: http://www.nabble.com/rollapply%28%29-to-portions-of-a-matrix-tp18761906p18761906.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 07
1
long run time for loop operation & matrix fill
...ight, and it was still running when I checked 17 hours later. I have tested the operation on a smaller matrix and it executes fine, so I believe there is nothing wrong with the code. I was just wondering if this is normal program execution speed for such an operation on a P4 with 2GB RAM? Thanks, rcoder -- View this message in context: http://www.nabble.com/long-run-time-for-loop-operation---matrix-fill-tp18876372p18876372.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 06
1
using acf() for multiple columns
...a matrix, is there a way I can specify how many plots I can display after the function executes? I managed to generate a multiple plot when I was experimenting, but the titles suggested the acf was calculated between adjacent columns in the matrix, which is something I was puzzled about. Thanks, rcoder -- View this message in context: http://www.nabble.com/using-acf%28%29-for-multiple-columns-tp18858672p18858672.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 24
1
problem running dll in R
...g gFortran. I place the dll in the R directory and it load in the console. The problem seems to occur when defining the data types in R, for the variables in the fortran routine. I was just wondering if anyone has experienced anything similar when trying to call fortran subroutines in R? Thanks, rcoder -- View this message in context: http://www.nabble.com/problem-running-dll-in-R-tp19126733p19126733.html Sent from the R devel mailing list archive at Nabble.com.
2007 Jan 26
10
Camping and DBI
Hi, I''ve been playing around with using DBI instead of ActiveRecord ''cause I just love to beat myself up! ;) Is this an okay way to do this, or is there any other more creative ways? require ''dbi'' module MyApp:Models class DB def self.dbh DBI.connect(''DBI:Mysql:dbname'', ''username'',
2008 Aug 23
2
how to call a C-library in R
Hi, everyone, I need to use a C library. But since I have little experience in C, I want to call this C library in R and program the rest in R. Does anyone know how to do this? Thanks, Cindy [[alternative HTML version deleted]]
2007 May 04
22
CampingConf?
Campers -- In a few weeks there will be a bunch of people in Portland, OR, for a conference. A long time ago some campers mentioned that might be a good time for us to get together and hold a mini CampingConf for a few hours. Is anyone interested? Does anyone want to organize it? I''m thinking Wednesday night, May 16. We could possibly get a spot at FreeGeek (not likely since they are
2007 Sep 28
9
PUT (and friends) bug?
As far as I can tell, sending an actual HTTP PUT request to a Camping app will never parse the params out of the request body - or am I going nuts? This code seems to say only POST''s will parse the request body: elsif @method == "post" and \ e.CONTENT_TYPE == "application/x-www-form-urlencoded" q.u(C.qsp(@in.read)) end I looked for an easy spot to stick
2008 Aug 05
0
P values in non linear regression and singular gradients using nls
...Your input is > greatly appreciated. See ?subplot in the TeachingDemos package. ------------------------------ Message: 7 Date: Sun, 3 Aug 2008 10:07:24 -0400 From: "Gabor Grothendieck" <ggrothendieck at gmail.com> Subject: Re: [R] losing row.names in matrix operations To: rcoder <mpdotbook at gmail.com> Cc: r-help at r-project.org Message-ID: <971536df0808030707y3b83a302l4f56bf653971441d at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Constructing a zoo object is well covered in ?zoo and in the three vignettes: vignette("zoo") vigne...