Re: [R] Renaming names in R matrix

2012-05-15 Thread Paolo Agnolucci
Hello, A = matrix(0, 3,3) rownames(A) = c(A, B, C) A [,1] [,2] [,3] A000 B000 C000 HTH, Thanks, Paolo On 15 May 2012 10:19, Gundala Viswanath gunda...@gmail.com wrote: I have the following matrix: dat [,1] [,2]

[R] RODBC Error

2010-10-18 Thread Paolo Agnolucci
Hi Everyone, I am trying to install RODBC but I get the following error message Error in library.dynam(lib, package, package.lib) : shared library 'RODBC' not found In addition: Warning message: package 'RODBC' was built under R version 2.12.0 Error: package/namespace load failed for 'RODBC'

[R] VectorComparison

2010-10-18 Thread Paolo Agnolucci
Hi all, I am not exactly fluent in R and I got stuck with this. I would like to compare each elements of a vector A with any of the elements in Vector B. For some reasons it does not work. StartDate = as.Date(01/10/2007, %d/%m/%Y) TimeSpan = seq(StartDate, by = 'days', length =

Re: [R] VectorComparison

2010-10-18 Thread Paolo Agnolucci
Yes - that worked. Thank you. Incidentally I was also comparing a date to a string which surely didn't help Thanks again Ron On Mon, Oct 18, 2010 at 2:01 PM, Henrique Dallazuanna www...@gmail.comwrote: Use %in% instead of '==' On Mon, Oct 18, 2010 at 10:50 AM, Paolo Agnolucci

[R] Predict when regressors are passed through a data matrix

2010-05-05 Thread Paolo Agnolucci
Hi everyone, this should be pretty basic but I need asking for help as I got stuck. I am running simple linear regression models on R with k regressors where k 1. In order to automate my code I packed all the regressors in a matrix X so that lm(y~X) will always produce the results I want

Re: [R] Predict when regressors are passed through a data matrix

2010-05-05 Thread Paolo Agnolucci
to be: to use predict() predictably, make sure that the inputs to lm() are in a data frame. One experiences far fewer headaches that way. A clearer, pithier explanation of why this phenomenon occurs would be welcome, too :) HTH, Dennis On Wed, May 5, 2010 at 3:16 AM, Paolo Agnolucci