[R] Problem in extracting EQY_DVD_HIST from Bloomberg

2007-09-18 Thread Shubha Vishwanath Karanth
Hi R, Again the problem in Bloomberg, I give the below code, con = blpConnect(show.days=trading,na.action=previous.days,periodicity=da ily)# connecting Bloomberg div - blpGetData(con,IBM US Equity,EQY_DVD_HIST,start=as.chron(as.Date(01/01/2005, %m/%d/%Y)),end=as.chron(Sys.Date()))

Re: [R] system.time behavior using source

2007-09-18 Thread Prof Brian Ripley
You need to print the result of an expression if used from source(). Autoprinting only occurs at the top level. E.g. % cat systest.R print(system.time(for(i in 1:100) mad(runif(1000 source(systest.R) user system elapsed 0.140.000.20 On Mon, 17 Sep 2007, Leeds, Mark (IED)

Re: [R] Installing add-on packages

2007-09-18 Thread Stefan Grosse
On Tuesday 18 September 2007 07:23:17 [EMAIL PROTECTED] wrote: jp Admittedly, I don't have much experience with R. I have dowloaded and jp installed some add-on packages (leaps, for one). When I try to run the jp leaps function I get the following error: jp jp Error: could not find function

[R] FW: ISIN numbers into Bloomberg tickers

2007-09-18 Thread Shubha Vishwanath Karanth
Hi David, I tried the following and get the below error messages con = blpConnect(show.days=trading,na.action=previous.days,periodicity=da ily)# connecting Bloomberg dat - blpGetData(con,US4009703799 Equity,PX_LAST,start=as.chron(as.Date(01/01/2005,

Re: [R] Sourcing encrypted files

2007-09-18 Thread Prof Brian Ripley
On Mon, 17 Sep 2007, Dennis Fisher wrote: Colleagues, I have an unusual problem; I am wondering whether anyone has dealt with it and found a solution. I have a script that needs to be encrypted. R will then be run on the script. There are various means to decrypt the file, some of which

[R] Odp: aggregate function oddity

2007-09-18 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 17.09.2007 14:29:17: Dear All, I tried to aggregate the rows according to some factors in a data frame. I got the Error in Summary.factor(..., na.rm = na.rm) : sum not meaningful for factors message. This problem was once already discussed in

Re: [R] help for high-quality plot again

2007-09-18 Thread Duncan Mackay
I now rarely use Word; if the size of the wmf as fixed by the win.metafile is smaller than the size of the page within the margins you should have no problem. So for letter size 8.5 x 11 inches with 1 inch margins and allowing 0.5 in for a label you coud have a landscape mode wmf size of height

Re: [R] question on layout and image.plot

2007-09-18 Thread Paul Murrell
Hi Ranjan Maitra wrote: Dear colleagues, I have struggled for the past couple of days with the following layout of plots. First, for something that finally works (and I understand it also, or so I think!): A B x where A and B are 4x4 matrices of images, x is the common legend for

Re: [R] How to Standardise the x/y coordinates to the unit square?

2007-09-18 Thread Peter Dalgaard
张志杰 wrote: Dear Rusers, I want to standardise the values of x/y coordinates to the unit square, i.e. make the x-values all lie within [0,1] and all the y-values lie within [0,1] in the bottom example. I had thought to use scale() function to do it, but it seems that it's used to

Re: [R] How can I write routines and scripts in the R environmen

2007-09-18 Thread Ted Harding
On 17-Sep-07 18:11:26, Maura E Monville wrote: I would like to plot some semi-periodic signals as a function of the phase expressed as a value in [0,2PI] The problem is that the phase data is reported as the residual of the division by 2PI. For instance if the phase is 10.359 rd then:

[R] Linear model with svyglm

2007-09-18 Thread Werner Wernersen
Hi, I am a bit unclear if svyglm with family=gaussian is actually a normal linear model including weighting. The goal is to estimate a normal linear model using sample inflation weights. Can anybody illuminate me a bit on this? Thanks a lot! Werner

Re: [R] Create correlated data with skew

2007-09-18 Thread Dimitris Rizopoulos
Quoting bbolker [EMAIL PROTECTED]: Mike Lawrence wrote: Hi all, I understand that it is simple to create data with a specific correlation (say, .5) using mvrnorm from the MASS library: library(MASS) set.seed(1) a=mvrnorm( +n=10 +,mu=rep(0,2) +

Re: [R] Cox regression and p-values

2007-09-18 Thread Marc Schwartz
I'll throw in a more recent citation: Chi-squared and Fisher-Irwin tests of two-by-two tables with small sample recommendations Stat in Med 26:3661-3675; 2007 http://www3.interscience.wiley.com/cgi-bin/abstract/114125487/ABSTRACT to which Frank Harrell has offered some comments here (bottom of

Re: [R] Cox regression and p-values

2007-09-18 Thread Peter Dalgaard
Duncan Murdoch wrote: On 9/18/2007 12:41 PM, Daniel Brewer wrote: Hello, I might be barking up the wrong tree here, but I want to make sure I have a full understanding of this. What I would like to know is what tests are performed to give the p-values for each variable in the table that

Re: [R] unbalanced effects in aov

2007-09-18 Thread Brooke LaFlamme
Thank you for the suggestions from Professor Ripley and Steve Elliot. I see now why my data are unbalanced even though I don't have any missing data. I think I should use other methods designed for unbalanced data, but does using lme with plate as a random effect also help to fix this problem?

[R] Create a loop to conduct multiple pairwise binary operations

2007-09-18 Thread Luke Neraas
#Hello, #I have three data frames, X,Y and Z with two columns each and different numbers of rows. # creation of data frame X X.alleles - c(1,5,6,7,8) X.Freq- c(0.35, 0.15, 0.05, 0.10, 0.35) Loc1 - cbind( Loc1.alleles,Loc1.Freq) X- data.frame(Loc1) #creation

Re: [R] xyplot question

2007-09-18 Thread Peter Alspach
Raymond I had the same question a while ago and found the answer by typing RSiteSearch('xyplot error bars') Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Raymond Balise Sent: Wednesday, 19 September 2007 10:52 a.m. To: [EMAIL