[R] Automating R script with Windows 7

2012-03-05 Thread vincent.deluard
Hi R-users, I am trying to automate the daily running of a simple R script from Windows 7. From previous posts, I understand that this needs to be done with the task scheduler. I can schedule my laptop to automatically open R at a certain time, but not to execute a script. Secondary question:

Re: [R] Automating R script with Windows 7

2012-03-05 Thread vincent.deluard
Hey Jim, Thanks for the help. It took me a little bit of research but I got your solution to work. For everybody who has the same problem (1) remember to use the abbreviated names (no space) in folder paths: ex: 'C:\PROGRA~1\R\R-2.11.1\bin\RScript.exe' (2) put the folder with the R script to

Re: [R] Automating R script with Windows 7

2012-03-05 Thread vincent.deluard
Hi Jim, Please disregard my earlier post -- I have done some research and realized the space between after program was the the issue. I can now open RScript.exe from the command prompt using the abbreviated form: C:\PROGRA~1\R\R-2.11.1\bin\RScript.exe From your earlier post, I understand the

[R] Saving run time in loop

2011-04-20 Thread vincent.deluard
Hi r users, I am trying to compute the moving variance of a large matrix. I now use a loop but I am looking for a faster solution. Here is a sample of the code. Source= matrix(rnorm(400),ncol=100) variances= matrix(rep(NA,4*100),ncol=100) for (i in 1:80)

[R] Panel regression

2010-10-25 Thread vincent.deluard
Hi, I am trying to run a panel regression where I have a matrix of observations and a matrix of independant variables - examples would trying to predict countries's GDP with their data on education, FDI, tax rates, over time. For the purpose of simplicity, my data would be: dep =

[R] Right digits of a floating number

2010-07-27 Thread vincent.deluard
Hi all, I am dealing with very large numbers but I am only interested in their last digits. 244^244 [1] Inf As far as I can tell, the largest number R can take has 308 digits (1+E308). Is there a way I could see the last digits only of 244^244? Many thanks for your help. Vincent Deluard,

Re: [R] Tutorial on rgl Graphics

2010-05-24 Thread vincent.deluard
Hi Duncan, I love your plotlm3d function! I want to plot the following data: x [1] 1 2 3 4 5 6 7 8 9 10 y [1] 0.5678042 0.3986702 0.3063544 0.2554426 0.1954868 0.1238850 0.1161249 0.1689951 0.1826783 0.2406300 z [1] 0.2558812 0.2619668 0.2585930 0.2563669 0.2588323 0.2734029

[R] Anybody has experience with plotlm3d function and can help me?

2010-05-24 Thread vincent.deluard
Hi Duncan, I am trying to use the plotlm3d function which I believe was written by John Fox and later modified by Jose Claudio Faria and Duncan Murdoch. It is a great way to plot data points in a 3D environment but I do not see how to customize the size of the axes. I want to plot the

Re: [R] How to rank matrix data by deciles?

2010-05-13 Thread vincent.deluard
Dear Phil, You helped me with a request to rand matrix columns by deciles two weeks ago. This really un-blocked me on this project but I found a little bug. As in before, my data is in a matrix: madebt[1:16,1:2] X4.19.2010 X4.16.2010 [1,] 26.61197531 26.58950617 [2,] 5.72765432

[R] tapply function with NA

2010-05-09 Thread vincent.deluard
Hi R users, I have a matrix m of the type: m X4.20.2010 X4.19.2010 X4.16.2010 [1,] 0.008319468 0. -0.008250825 [2,] 0.005574136 0.01816118 0.073081608 [3,] -0.047830688 0.01612903 -0.030239833 [4,] NA NA NA [5,] 0.008746356 0.02848576

[R] Evaluating matrices without using loops

2010-05-08 Thread vincent.deluard
Hi R users, I am trying to set the values of elements of one matrix based on the values of elements of another matrix. Say I have 2 matrices, y and z. y = matrix(rnorm(35), ncol=5) z = matrix(rep(0,35), ncol=5) I want z[i,j] to take a value of y[i,j] when y[i,j] is greater than 0, and zero

[R] How to rank matrix data by deciles?

2010-05-06 Thread vincent.deluard
Hi R users, I have a matrix of data similar to: y=matrix(rnorm(55),ncol=5) I would like to know to which decile each number belongs compared to the numbers in its column. Say y[1,1] is the third decile among y[1:11,1] and y[2,1] is in the second decile I would like get a matrix that would

Re: [R] read.table or read.csv without row index?

2010-05-05 Thread vincent.deluard
Hi, I have the same problem as Wong. I have a csv file that contains weather observation (rows) by days (in columns). I open using: temp = read.csv(Weather.csv, sep=,) and read: X X1.Jan X2.Jan X3.Jan X4.Jan 1 Min 2 3 4 1 2 Max 6

[R] Read data from .csv file as a matrix

2010-05-05 Thread vincent.deluard
Hi R-users, I have a csv file that contains weather observation (rows) by days (in columns). I open using: temp = read.csv(Weather.csv, sep=,) and read: X X1.Jan X2.Jan X3.Jan X4.Jan 1 Min 2 3 4 1 2 Max 6 10 8 6

Re: [R] read.table or read.csv without row index?

2010-05-05 Thread vincent.deluard
10005 Phone: (+1) 646-512-5616 From: JiHO-2 [via R] [mailto:ml-node+2131575-1078352091-90...@n4.nabble.com] Sent: Wednesday, May 05, 2010 3:51 PM To: vincent.deluard Subject: Re: read.table or read.csv without row index? I tried as.matrix but it did not help. as.matrix() won't work because

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread vincent.deluard
Hi there, This will sound very stupid because I just started using R but I see you had similar problems. I just loaded a very large dataset (2950*6602) from csv into R. The format is ticker=row, date=column. Every time I want to compute basic operations, R returns In Ops.factor: not meaningful

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread vincent.deluard
Investment Research 40 Wall Street, 28th Floor New York, NY 10005 Phone: (+1) 646-512-5616 From: David Winsemius [via R] [mailto:ml-node+2124710-750256529-90...@n4.nabble.com] Sent: Monday, May 03, 2010 6:35 PM To: vincent.deluard Subject: Re: / Operator not meaningful for factors On May 3, 2010

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread vincent.deluard
From: John Kane-2 [via R] [mailto:ml-node+2124731-1168690456-90...@n4.nabble.com] Sent: Monday, May 03, 2010 6:51 PM To: vincent.deluard Subject: Re: / Operator not meaningful for factors I think that you are correct. R has the annoying habit of converting character data to factors when you