Re: [R] Running R function as a Batch process

2007-05-16 Thread Hanke, Alex
Hi, There are many clues in the help. First I created the file c:\sumfunction.R x-as.numeric(commandArgs()[-1:-4] ) print(x) addtogether-function(x,y){SUM-x+y;print(SUM)} addtogether(x[1],x[2]) Then at the command line in Windows I enter R --vanilla --slave --args 7 10 c:\sumfunction.R

Re: [R] Error using newdata argument in survfit

2005-06-16 Thread Hanke, Alex
arguments Which is a nice change but still short of knowing what is going on. Regards Alex -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: June 15, 2005 4:24 PM To: Hanke, Alex Cc: 'r-help@stat.math.ethz.ch' Subject: Re: [R] Error using newdata argument

Re: [R] Error using newdata argument in survfit

2005-06-16 Thread Hanke, Alex
(Prior.f). Rather one should predefine the factor variable Prior.f-factor(Prior.f) and use that term in the model and then Thomas' solution works fine. Alex -Original Message- From: Thomas Lumley [mailto:[EMAIL PROTECTED] Sent: June 16, 2005 11:00 AM To: Hanke, Alex Cc: 'r-help

[R] Error using newdata argument in survfit

2005-06-15 Thread Hanke, Alex
Dear R-helpers, To get curves for a pseudo cohort other than the one centered at the mean of the covariates, I have been trying to use the newdata argument to survfit with no success. Here is my model statement, the newdata and the ensuing error. What am I doing wrong? summary(fit) Call:

[R] Survfit,newdata and continuous time varying covariates

2005-06-14 Thread Hanke, Alex
Hi All, I am working with three time varying covariates in a coxph model. I cannot seem to figure out how to use survfit and the newdata argument to provide estimated survival curves for two scenarios of one covariate while holding the other two at the mean value. Is it possible to display how

[R] Estimate of baseline hazard in survival

2005-06-10 Thread Hanke, Alex
Dear All, I'm having just a little terminology problem, relating the language used in the Hosmer and Lemeshow text on Applied Survival Analysis to that of the help that comes with the survival package. I am trying to back out the values for the baseline hazard, h_o(t_i), for each event time or

[R] Problem installing packages and weird R site behaviour

2005-03-29 Thread Hanke, Alex
Hi, I tried to install a package using the menu option and was presented a list filled with NA's. I then tried visiting the R site and each option on the side bar (eg. CRAN, Search,FAQ) sends me to the address attached below (NB: I left off the h in http). The first problem seems to be related to

[R] Hexidecimal conversion

2004-12-02 Thread Hanke, Alex
Help I can produce the hexidecimal equivalent of a decimal number but I am having a hard time reversing the operation. I'm good for hex representations to 159 and am close to extending to 2559. The archives are not clear on the existence of a function for this task. Is there one? Here is what I

RE: [R] Hexidecimal conversion

2004-12-02 Thread Hanke, Alex
: December 2, 2004 9:42 AM To: Hanke, Alex Subject: Re: [R] Hexidecimal conversion On Wed, 01 Dec 2004 15:07:16 -0400, Hanke, Alex [EMAIL PROTECTED] wrote : Help I can produce the hexidecimal equivalent of a decimal number but I am having a hard time reversing the operation. I'm good for hex

[R] Google for scientists: search engine

2004-11-30 Thread Hanke, Alex
A new way to search for documentation on your favourite science topic. http://scholar.google.com/ http://scholar.google.com/ Alex Hanke Department of Fisheries and Oceans St. Andrews Biological Station 531 Brandy Cove Road St. Andrews, NB Canada E5B 2L9 [[alternative HTML version

[R] RODBC and Table views

2004-11-22 Thread Hanke, Alex
This question relates to the use of the RODBC package for retrieving data from a MS Access database. It is quite easy to retrieve data sitting in tables but is it possible to select from views based on these tables? The archives do not touch on this point. sqlTables() lets me see tables and views

RE: [R] isoMDS

2004-09-09 Thread Hanke, Alex
I get the following message: Error in isoMDS(tt) : zero or negative distance between objects 1 and 2 This makes sense since a and b are identical in their relationship to c to h. Drop row 1 and col 1 and you get isoMDS(tt[2:8,2:8]) initial value 14.971992 iter 5 value 8.027815 iter 10 value

RE: [R] kolmogorov-smirnov for discrete ordinal scale data

2004-09-09 Thread Hanke, Alex
Hi I think the answer is no. However, I have written a script that implements the test described in Testing for shifts in the Vertical Distribution of Plankton using a robust Kolmogorov-Smirnov like Statistic by Smith, Beet and Solow (1998). The test has the properties you are looking for. If this

RE: [R] Skipping panels in Lattice

2004-09-09 Thread Hanke, Alex
I have the same problem. As far as I can see, the only thing you can do is : attach(df2) group=paste(facb,facc,sep= ) bwplot( dv ~ faca | factor(group)) Alex -Original Message- From: Leon Barmuta [mailto:[EMAIL PROTECTED] Sent: September 9, 2004 1:19 AM To: [EMAIL PROTECTED] Subject:

RE: [R] isoMDS

2004-09-08 Thread Hanke, Alex
Distances cannot always be constructed from similarities. This can be done only if the matrix of similarities is nonnegative definite. With the nonnegative definite condition, and with the maximum similarity scaled so that s_ii=1, d_ik=(2*(1-s_ik))^-.5 Check out the vegan package. Alex

RE: [R] isoMDS

2004-09-08 Thread Hanke, Alex
Distances are often called disimilarities. -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: September 8, 2004 11:58 AM To: Hanke, Alex Cc: 'Doran, Harold'; '[EMAIL PROTECTED]' Subject: RE: [R] isoMDS On Wed, 8 Sep 2004, Hanke, Alex wrote: Distances cannot

RE: [R] A question about external time-dependent covariates in co x model

2004-08-19 Thread Hanke, Alex
Dear Rui, From my understanding of time-dependent covariates (not an expert but have been working on a similar problem), it would appear that the coding of the status column is not correct. Unless you have observed an event at each interval you should only have status=1 for the last interval. In

[R] Clustering and the test for proportional hazards

2004-08-19 Thread Hanke, Alex
Dear List, Is the test for proportional hazards valid when the model contains a cluster variable? The output looks strange with the cluster variable. My intervals are based on calendar time and the clustering variable is related to the season the event occurs in.

[R] Xtable method for coxph, bug?

2004-08-18 Thread Hanke, Alex
Hi There is a xtable method for coxph. It bombs, however, when applied to my coxph object. It cannot find 'nse' which I think is sqrt(diag(coxph.object$naive.var)). Adding 'nse' to the coxph object cures the problem. Is this a bug in xtable.coxph? There is no xtable method for summary.coxph.

RE: [R] Isotopic notation in plots

2004-05-18 Thread Hanke, Alex
Henrik, Please try: plot(1:10,xlab=expression({}^{14}*C)) -Original Message- From: Andersson, Henrik [mailto:[EMAIL PROTECTED] Sent: May 18, 2004 7:00 AM To: [EMAIL PROTECTED] Subject: [R] Isotopic notation in plots I really like to use R for all my graphs, and as I work with stable

[R] (no subject)

2004-04-21 Thread Hanke, Alex
Dear R-Help Does The R Package for Multivariate and Spatial Analysis Version 4.0 (Casgrain and Legendre, 2001) exist on CRAN and under what name? It supposedly has a chronological clustering program ,CHRONO, that I would like to use. Alternatively, I would ask if there is a R based program that

RE: [R] multiple plots problem

2004-04-01 Thread Hanke, Alex
The command: layout(c(1,2,3), 3, 1) specifies 3 plots Try layout(1:4,2,2,byrow=T) Regards, Alex -Original Message- From: Oleg Bartunov [mailto:[EMAIL PROTECTED] Sent: April 1, 2004 7:39 AM To: R-help Subject: [R] multiple plots problem Hello, for testing learning purposes I create

RE: [R] multiple plots problem

2004-04-01 Thread Hanke, Alex
Correction: I should have wrote layout(matrix(c(1,2,3,4), 2, 2, byrow = TRUE)) Sorry Alex -Original Message- From: Hanke, Alex [mailto:[EMAIL PROTECTED] Sent: April 1, 2004 9:25 AM To: 'Oleg Bartunov'; '[EMAIL PROTECTED]' Subject: RE: [R] multiple plots problem The command: layout(c

[R] identify() and controlling label size

2004-03-31 Thread Hanke, Alex
I thought this was going to be easy ... Can the label size of identify() be controlled by setting par(cex.*) because I'm having no luck? My only recourse is to save the index and position of the labels from identify() and use text() to replot them. Regards Alex Alex Hanke Department of Fisheries

RE: [R] identify() and controlling label size

2004-03-31 Thread Hanke, Alex
Thank-you it works! I have ignored ps and relied on the cex arguments until now. Alex -Original Message- From: Barry Rowlingson [mailto:[EMAIL PROTECTED] Sent: March 31, 2004 10:59 AM To: Hanke, Alex Cc: '[EMAIL PROTECTED]' Subject: Re: [R] identify() and controlling label size Hanke

RE: [R] strange thing with sd

2004-03-29 Thread Hanke, Alex
Just so you don't feel that you are alone I get the same response as you use R1.8.0 on an XP operating system. Alex -Original Message- From: Andreas Pauling [mailto:[EMAIL PROTECTED] Sent: March 29, 2004 10:02 AM To: [EMAIL PROTECTED] Subject: [R] strange thing with sd Dear R

RE: [R] Setting the 'fig' graphic parameter

2004-03-22 Thread Hanke, Alex
Try: x - rnorm(100) y - rnorm(100) par(fig=c(0,0.7,0,1)) plot(x,y) # (please maximise your plotting device so you get a 'rectangular' area) # now lets do the upper corner 'little' plot par(fig=c(0.7, 1, 0.5, 1),new=T) plot(x,y) # and ... par(fig=c(0.7, 1, 0, 0.5),new=T) plot(x,y)

RE: [R] Help to compare...

2004-03-22 Thread Hanke, Alex
DF-data.frame(V1=c(0,8,6,4,3,1,2,9,6,5),V2=1:10) DF[((DF$V1=2 DF$V18)*1:10)[2:8],] -Original Message- From: joseclaudio.faria [mailto:[EMAIL PROTECTED] Sent: March 22, 2004 1:28 PM To: [EMAIL PROTECTED] Subject: [R] Help to compare... Dear list, I'm needing submit values (V1 =

RE: [R] Reading Data

2004-03-19 Thread Hanke, Alex
The following response by B.Ripley to a similar request may help. Alex On Tue, 21 Oct 2003, Ernie Adorio wrote: Am using R on a Linux box and am currently writing an interactive R script. 1. How do I ask a user to press any key to continue ? I used a system call to read but this only

RE: [R] How to ascertain the number of clusters automatically?

2004-03-10 Thread Hanke, Alex
Hi, You may be interested in a clustering algorithm called OPTICS. It is both interactive and automatic and does not require a lot of input parameters. It is described as creating an augmented ordering of the data representing its density-based clustering structure. It automatically and

RE: [R] Rank Simulations - Test statistic Help

2004-03-10 Thread Hanke, Alex
Dear S, Try rephrasing your question instead of altering the subject line. I can see why you haven't any takers. Alex -Original Message- From: S P [mailto:[EMAIL PROTECTED] Sent: March 10, 2004 9:59 AM To: [EMAIL PROTECTED] Subject: [R] Rank Simulations - Test statistic Help Hi all, I

RE: [R] boot package

2004-03-08 Thread Hanke, Alex
Hi, The function anosim() in vegan package or sample() in base may be of help to you. Alex -Original Message- From: Rogério Rosa da Silva [mailto:[EMAIL PROTECTED] Sent: March 4, 2004 4:57 AM To: rhelp Subject: [R] boot package Dear all As part of an ongoing study on the

RE: [R] limit to complex plots?

2004-02-26 Thread Hanke, Alex
try: layout(matrix(c(0,0,0,0,0,1,0,2,0,0,0,0,0,3,0,4), nrow=4, byrow=TRUE)) plot(rnorm(10), rnorm(10)) plot(rnorm(20), rnorm(20)) plot(rnorm(30), rnorm(30)) plot(rnorm(40), rnorm(40)) -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL

[R] strptime() behaviour

2004-02-20 Thread Hanke, Alex
Is it normal behaviour for strptime(29-Jan-01,%d-%b-%y)$mon to return a value of 0? strptime(29-Jan-01,%d-%b-%y)$year #works ok 101 strptime(29-Jan-01,%d-%b-%y)$mday #works ok 29 Regards, Alex Alex Hanke Department of Fisheries and Oceans St. Andrews Biological Station 531 Brandy Cove Road St.

RE:[R] reshape direction=wide

2004-02-19 Thread Hanke, Alex
v.names=c(var1,var2) creates a separate column for each combination of variables in v.names and level of variable identified by timevar. I am reshaping a data.frame bids -- reshaped as shown below. I thought this should be possible with a single invocation of reshape, but the only way I came

[R] glm.poisson.disp versus glm.nb

2004-02-06 Thread Hanke, Alex
In response to my own query (see below), The estimate theta from glm.nb is actually 1/phi or 1/alpha in some texts, where phi is the dispersion parameter for the negative binomial distribution. However, the dispersion estimate from glm.poisson.disp does not equal 1/theta because 1/theta is a

[R] glm.poisson.disp versus glm.nb

2004-02-02 Thread Hanke, Alex
Dear list, This is a question about overdispersion and the ML estimates of the parameters returned by the glm.poisson.disp (L. Scrucca) and glm.nb (Venables and Ripley) functions. Both appear to assume a negative binomial distribution for the response variable. Paul and Banerjee (1998) developed