Re: [R] Creating Hmisc labels inside a function

2007-09-18 Thread Steve Powell
Thanks again Frank for quick reply. True, someobject=2 Test=function(obj,labe) { label(obj)=labe #at this point add the line: obj } Test(someobject,"somelabel") #returns a label. But if you retype someobject #the label has gone. That is what I meant by the label not being perman

[R] certain number of equations in function depending on parameter

2007-09-18 Thread Andreas Wittmann
Hello everybody, i have the following problem to write a function which recognizes depending on the parameter-inputs how many equations for the calculation in the function are needed. Here is an example of my problem: "myfun" <- function(a, b, c, d) { k <- length(a) #here d = 3 for exa

Re: [R] Welcome to the "R-help" mailing list

2007-09-18 Thread 马传香
2007/9/19, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > Welcome to the R-help@r-project.org mailing list! > > To post to this list, send your email to: > > r-help@r-project.org > > General information about the mailing list is at: > > https://stat.ethz.ch/mailman/listinfo/r-help > > If you ever want

Re: [R] recommended package/docs for analyzing multiple choice tests

2007-09-18 Thread Chung-hong Chan
Hello. I think "Using R for psychology research" maybe useful for you. http://www.personality-project.org/r/r.guide.html On 9/19/07, Doug Holton <[EMAIL PROTECTED]> wrote: > Hi, > What package would you recommend for analyzing the > validity/reliability of multiple choice tests. Doing things

[R] fontsize in mosaic plot lables

2007-09-18 Thread Alexander.Herr
Hi List, I am trying unsucessfully to modify the fontsize of lables in mosaic: require(vcd) mosaic(Titanic, pop=FALSE, labeling_args=list(rot_labels=c(bottom=90,top=90), set_varnames = c(Sex = "Gender"), gp_text=gpar(fontsize=20))) #can't get it to resize text tab <- ifelse(Tita

[R] about "normalized y" via covariance analysis

2007-09-18 Thread XinMeng
Hello sir: Here's a question on covariance analysis which needs your help. There're 3 experiments,and x refers to control while y refers to experimental result. The purpose is to compare the "y" values across the 3 experiments. experiment_1: x:0.1 0.2 0.3 0.4 0.5 y:0.5 0.6 0.6 0.7 0.9

[R] R advice

2007-09-18 Thread Daniel White
Dear R-help As a novice to R I was seeking some advice with respect to using R to help solve a problem I have. I have a large number of infiles that need analysed. This can be done, I believe, using 2 separate R packages (popgen and ape) with the output from 'popgen' being used as input fo

[R] recommended package/docs for analyzing multiple choice tests

2007-09-18 Thread Doug Holton
Hi, What package would you recommend for analyzing the validity/reliability of multiple choice tests. Doing things such as classical test analysis, factor analysis, item response theory. I've used psychometric (item.exam), MiscPsycho (alpha.Summary), and ltm (rcor.test). MiscPsycho reported th

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

2007-09-18 Thread Luke Neraas
#Hello, # Sorry, my last letter contained an error this code should work #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( X.

[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) #creati

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: [EMAI

[R] Microarray Workshop in Tucson, January 2008

2007-09-18 Thread David Henderson
This is forwarded on behalf of David Galbraith at The University of Arizona. For Biologists, this is an excellent way to either gain or improve your skills in microarray techniques and gain experience in the proper statistical analysis and experimental design of microarray experiments. For statist

[R] xyplot question

2007-09-18 Thread Raymond Balise
I am tring to add error bars to data in an xyplot. Below is the content of a CSV file that I am trying to use and the code which plots the data points and 45 degree lines in each of the panes of the trellice. I want to add error bars that go up and down to the limits set by the lcl and ucl values

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?

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 ta

Re: [R] installing rgl package on linux platform

2007-09-18 Thread Duncan Murdoch
On 18/09/2007 2:55 PM, Dirk Eddelbuettel wrote: > On Tue, Sep 18, 2007 at 02:08:18PM -0400, Leeds, Mark (IED) wrote: >> I am using Redhat Linux and my info is below. I was trying to install >> the rgl package using R CMD INSTALL and it was doing >> fine until it got to the compilation of a pixm

Re: [R] help for high-quality plot (wmf) in files

2007-09-18 Thread Kuhn, Max
> Standard sweave may not work for this, but there is the odfWeave package > that will create openoffice documents which can easily be converted to > word docs (I have used this for creating sets of graphs to send to > clients who only use word). I don't know if it can generate .wmf files > or not

[R] machine learning and horse racing

2007-09-18 Thread Gerard Smits
Hi Stephen, Not responding to the R memory question, but to the racing. I worked on this many years ago and found no way of overcoming the 19% or so paramutual take. That being said, I suggest you take class into account (based on purse, type of race (maiden claiming, claiming $, NWxx allowan

Re: [R] a quick question about "format()"

2007-09-18 Thread Tony Plate
runner wrote: > In the documentation of 'pairs'(package:graphics), within the last example, > it reads: > > format(c(r, 0.123456789), digits=3)[1] > > Why not simple use: format(r, digits=3)? What is the difference? Here are some examples of the difference: > for (r in 1.2*10^(-6:9)) cat(form

Re: [R] graphs with gradients of colors

2007-09-18 Thread Greg Snow
The first question you should ask is "why do you want to do this?". Adding gradients and other things like that can make a graph look neat, but can also distort the information in the graph. You should carefully consider whether doing things like this really help the graph, or distract from it. I

[R] a quick question about "format()"

2007-09-18 Thread runner
In the documentation of 'pairs'(package:graphics), within the last example, it reads: format(c(r, 0.123456789), digits=3)[1] Why not simple use: format(r, digits=3)? What is the difference? Thanks. -- View this message in context: http://www.nabble.com/a-quick-question-about-%22format%28%29%

Re: [R] installing rgl package on linux platform

2007-09-18 Thread Dirk Eddelbuettel
On Tue, Sep 18, 2007 at 02:08:18PM -0400, Leeds, Mark (IED) wrote: > I am using Redhat Linux and my info is below. I was trying to install > the rgl package using R CMD INSTALL and it was doing > fine until it got to the compilation of a pixmap program ? Does anyone > know what I could do to fix th

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

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 pa

Re: [R] Create correlated data with skew

2007-09-18 Thread bbolker
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) > + ,Sigma=matrix(c(1,.5,.5,1),2,2

Re: [R] help for high-quality plot (wmf) in files

2007-09-18 Thread Greg Snow
Standard sweave may not work for this, but there is the odfWeave package that will create openoffice documents which can easily be converted to word docs (I have used this for creating sets of graphs to send to clients who only use word). I don't know if it can generate .wmf files or not, but it d

Re: [R] Cox regression and p-values

2007-09-18 Thread Cody Hamilton
Daniel, With regards to the use of Fisher's exact test when cell counts are less than 5, take a look at: D'Agostino, RB, Chase, W and Belanger, A (1988). 'The appropriateness of some common procedures for testing the equality of two independent binomial populations.' 42:198-202. Regards, -

[R] installing rgl package on linux platform

2007-09-18 Thread Leeds, Mark (IED)
I am using Redhat Linux and my info is below. I was trying to install the rgl package using R CMD INSTALL and it was doing fine until it got to the compilation of a pixmap program ? Does anyone know what I could do to fix that ? Is it possible that this package is not usable on this platform ? Than

Re: [R] longtable and Sweave

2007-09-18 Thread Marc Schwartz
On Mon, 2007-09-17 at 12:26 +0200, Delphine Fontaine wrote: > Dear Sweave-users, > > I want to print listing using sweave. Because my tables are very big, I use > the longtable option. But, is it possible to recall the first line of the > table (e.g the colnames line) on each new page ? > Thanks f

[R] lme, diagnostic plots and missing values

2007-09-18 Thread Mark Wardle
Dear all, I'm using lme() to great success in modelling some of my clinical data. It's saved me hours so I'm very grateful to have such powerful tools! I'm now exploring model diagnostics (using Pinheiro/Bates mixed effects book), but have come across a problem with missing data: # the models -

Re: [R] Cox regression and p-values

2007-09-18 Thread Duncan Murdoch
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 is the result of coxph

[R] Cox regression and p-values

2007-09-18 Thread Daniel Brewer
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 is the result of coxph regression when the variables are categorical only.

Re: [R] unbalanced effects in aov

2007-09-18 Thread Prof Brian Ripley
On Fri, 14 Sep 2007, Brooke LaFlamme wrote: > Hi, I have been having some trouble using aov to do an anova, probably > because I'm not understanding how to use this function correctly. For > some reason it always tells me that "Estimated effects may be > unbalanced", though I'm not sure what th

Re: [R] Problem in extracting EQY_DVD_HIST from Bloomberg

2007-09-18 Thread davidr
I'd guess start and end are confusing the bulk data call (it doesn't take those params). This works for me: div <- blpGetData(con, "IBM Equity", "EQY_DVD_HIST", retval="raw") You need the "raw" retval when anything is not numeric; then you need to extract the bits you want from the nested list re

[R] Nested loop ok now. Thanks to you all

2007-09-18 Thread Riddle Chin
Thanks, Julian, Phil and Erin. I have solved the problem. Riddle. - [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Proposal: Archive UseR conference presentations at www.r-project.org/useR-yyyy

2007-09-18 Thread Douglas Bates
On 9/18/07, hadley wickham <[EMAIL PROTECTED]> wrote: > On 9/18/07, Uwe Ligges <[EMAIL PROTECTED]> wrote: > > Earl F. Glynn wrote: > > > "hadley wickham" <[EMAIL PROTECTED]> wrote in message > > > news:[EMAIL PROTECTED] > > >> Many of the presentations and posters from UseR! 2007 are now available

[R] Survey package question

2007-09-18 Thread eugen pircalabelu
Good afternoon! 1 I have a bit of a problem with the Survey package, but one that is more theoretical than practical. If for example on wishes to use some additional information which comprises of 4 variables with 7, 5,5 and 5 categories (resulting in 875 post-strata if the whole crossin

[R] Time-dependent association rules

2007-09-18 Thread Nagu
Hi, How do we address time-dependent association rules with R? I have a large transactional database of consumers that bought from a set of n distinct products over the time period, T. I am interested in adding the time component to the association rules generation. (This kind of analysis falls i

[R] Importing a dataset

2007-09-18 Thread Marco Venanzi
Hi,how can I load a dataset from another file R.Data,without importing all the objects (functions and other datasets) contained in that file?Thanks, Marco

[R] longtable and Sweave

2007-09-18 Thread Delphine Fontaine
Dear Sweave-users, I want to print listing using sweave. Because my tables are very big, I use the longtable option. But, is it possible to recall the first line of the table (e.g the colnames line) on each new page ? Thanks for your help. Delphine __

[R] random Forests

2007-09-18 Thread David Montgomery
Hi, I am new to R and have a specific question about the randomForest package and the saving of trees and scoring. 1) I am looking to save the trees and score at a later time. Is there a way to load the saved trees and use the predict function? Can objects be saved and loaded i.e. the ran

Re: [R] problems with nested loop

2007-09-18 Thread Matthew Keller
hi Riddle, You subscript is out of bounds because this line: for (j in seq(20,100,20)){ is incorrect - it is trying to index the 20th, 40th, 60th... column of a matrix that has only 5 columns. Try for (j in 1:5) instead. I'm not sure what the purpose of your script is so can't comment on what e

Re: [R] MAD

2007-09-18 Thread deepayan . sarkar
On 9/18/07, Nair, Murlidharan T <[EMAIL PROTECTED]> wrote: > > > -Original Message- > From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] > Sent: Monday, September 17, 2007 5:10 PM > To: Nair, Murlidharan T > Cc: [EMAIL PROTECTED] > Subject: Re: [R] MAD > > On 9/17/07, Nair, Murlidharan T <[EMA

Re: [R] RE : Must be easy, but haven't found the function (numerical integration)

2007-09-18 Thread Ravi Varadhan
Here is a simple trapezoidal rule integrator: x <- time y <- value area <- sum(diff(x)*(y[-1]+y[-length(y)]))/2 Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of Ger

Re: [R] RE : Must be easy, but haven't found the function (numerical integration)

2007-09-18 Thread Ptit_Bleu
Thanks to all. cumsum can be helpful but the solution given by David seems to match my request. I will test it as soon as possible (before the end of the week, I hope). Have a nice end of day, Ptit Bleu. GOUACHE David wrote: > > try : > > library(Bolsatd) > ?sintegral > > or: > > library

[R] Giovanna Jonalasinio è fuori ufficio

2007-09-18 Thread Giovanna . Jonalasinio
Sarò fuori ufficio a partire dal 18/9/07 fino al 30/9/07 I'm going to have limited access to my email untill the 30th of september [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

Re: [R] Proposal: Archive UseR conference presentations at www.r-project.org/useR-yyyy

2007-09-18 Thread hadley wickham
On 9/18/07, Uwe Ligges <[EMAIL PROTECTED]> wrote: > Earl F. Glynn wrote: > > "hadley wickham" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > >> Many of the presentations and posters from UseR! 2007 are now available > >> online: > >> http://user2007.org/program/ > > > > The UseR

[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] Need help on "date"

2007-09-18 Thread Arun Kumar Saha
Dear Jeffrey, Your syntax looks very extraordinary to me. I would be very happy if you can explain this notation. Regards, On 9/18/07, Jeffrey Robert Spies <[EMAIL PROTECTED]> wrote: > > And one using regular expressions: > > x <- "2005-09-01" > pattern <- '([[:digit:]]{4})-([[:digit:]]{2})-([[:

Re: [R] Need help on "date"

2007-09-18 Thread Jeffrey Robert Spies
And one using regular expressions: x <- "2005-09-01" pattern <- '([[:digit:]]{4})-([[:digit:]]{2})-([[:digit:]]{2})' y <- sub(pattern, '\\1', x) m <- sub(pattern, '\\2', x) d <- sub(pattern, '\\3', x) -- Jeff. On Sep 18, 2007, at 5:00 AM, Arun Kumar Saha wrote: > Dear all, > > I have a variable

Re: [R] MAD

2007-09-18 Thread P Ehlers
If you read ?mad you will find this phrase: "median of the absolute deviations from the median" Note the first word. I think you're too focused on the last word. Peter Ehlers Nair, Murlidharan T wrote: > > -Original Message- > From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] > Sent: Mo

Re: [R] Histogram with colors

2007-09-18 Thread S Ellison
>>> "Alberto Monteiro" <[EMAIL PROTECTED]> 17/09/2007 21:11:51 >>> >Is there a simple way to plot a histogram with colors? > >I think I can do it in two steps: > > x.hist <- hist(x, plot=FALSE) > plot(x.hist, col=c(rep("red", 5), rep("green", 12))) > >but maybe a more direct way is available. No

Re: [R] Need help on "date"

2007-09-18 Thread Gabor Grothendieck
There have been a few solutions already but I thought I would add one that uses chron: > library(chron) > attach(month.day.year(chron(unclass(as.Date("2005-09-01") > year [1] 2005 > month [1] 9 > day [1] 1 or perhaps cleaner: library(chron) with(month.day.year(chron(unclass(as.Date("2006-09-

Re: [R] Problem updating packages

2007-09-18 Thread Gabor Grothendieck
On 9/18/07, Vladimir Eremeev <[EMAIL PROTECTED]> wrote: > > > Sergey Goriatchev wrote: > > > > Hello, everybody > > > > I have R 2.5.1 now installed on a laptop with Windows Vista Home > > Premium. I have problems updating the packages. Here is what I get at > > the prompt when I try to update: > >

[R] Sorry,an other question..

2007-09-18 Thread Giusy
Hello, if I can I'd like to ask you an other thing..can I use with R specific function to correct outliers in time series? What can I do? Thank you very much Giusy -- View this message in context: http://www.nabble.com/Sorry%2Can-other-question..-tf4474255.html#a12756688 Sent from the R help mai

[R] Time series analysis

2007-09-18 Thread Giusy
Hello, my name is Giusy and it's the first time I post in this forum. I'm a beginner with R, I have to use it to analyse time series and I need some help about these problems: 1. In my time series there are some NA values, but functions (arimaId, arima,..) seem not to work in this case...what coul

Re: [R] MAD

2007-09-18 Thread Nair, Murlidharan T
-Original Message- From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 5:10 PM To: Nair, Murlidharan T Cc: [EMAIL PROTECTED] Subject: Re: [R] MAD On 9/17/07, Nair, Murlidharan T <[EMAIL PROTECTED]> wrote: > > I am calculating the median absolute deviation us

Re: [R] Sourcing encrypted files

2007-09-18 Thread Marc Schwartz
On Tue, 2007-09-18 at 07:47 +0100, Prof Brian Ripley wrote: > 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

Re: [R] Problem updating packages

2007-09-18 Thread Vladimir Eremeev
Sergey Goriatchev wrote: > > Hello, everybody > > I have R 2.5.1 now installed on a laptop with Windows Vista Home > Premium. I have problems updating the packages. Here is what I get at > the prompt when I try to update: > > >> update.packages(ask='graphics') > --- Please select a CRAN mirro

[R] Problem updating packages

2007-09-18 Thread Sergey Goriatchev
Hello, everybody I have R 2.5.1 now installed on a laptop with Windows Vista Home Premium. I have problems updating the packages. Here is what I get at the prompt when I try to update: > update.packages(ask='graphics') --- Please select a CRAN mirror for use in this session --- trying URL 'http:

Re: [R] Need help on "date"

2007-09-18 Thread Prof Brian Ripley
On Tue, 18 Sep 2007, Frede Aakmann Tøgersen wrote: One way (perhaps not the most efficient) as.Date("2005-09-01","%Y-%m-%d") [1] "2005-09-01" format(as.Date("2005-09-01","%Y-%m-%d"),"%Y") [1] "2005" format(as.Date("2005-09-01","%Y-%m-%d"),"%d") [1] "01" format(as.Date("2005-09-01","%Y-%m

[R] systemfit: data

2007-09-18 Thread Martin Ivanov
Dear R users, I have a question on the function systemfit from the systemfit package. This function returns a list of the class systemfit, which besides all other information, contains the data frame of the whole system, called “data”. I have noticed the following issue. Suppose that I have to e

Re: [R] Proposal: Archive UseR conference presentations at www.r-project.org/useR-yyyy

2007-09-18 Thread Uwe Ligges
Earl F. Glynn wrote: > "hadley wickham" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Many of the presentations and posters from UseR! 2007 are now available >> online: >> http://user2007.org/program/ > > The UseR 2006 conference info and presentations are part of > www.r-pro

[R] RE : Must be easy, but haven't found the function (numerical integration)

2007-09-18 Thread GOUACHE David
try : library(Bolsatd) ?sintegral or: library(caTools) ?trapz David Gouache Arvalis - Institut du Végétal Station de La Minière 78280 Guyancourt Tel: 01.30.12.96.22 / Port: 06.86.08.94.32 -Message d'origine- De : Ptit_Bleu [mailto:[EMAIL PROTECTED] Envoyé : lundi 17 septembre 2007 12

Re: [R] Need help on "date"

2007-09-18 Thread jim holtman
Here is one way of doing it: > x <- as.POSIXct("2005-09-01") > x [1] "2005-09-01 GMT" > x.lt <- as.POSIXlt(x) > x$mon+1 > x.lt$mon+1 [1] 9 > x.lt$year+1900 [1] 2005 > dput(x.lt) structure(list(sec = 0, min = 0L, hour = 0L, mday = 1L, mon = 8L, year = 105L, wday = 4L, yday = 243L, isdst = 0L),

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

2007-09-18 Thread Jim Lemon
张志杰 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 standar

Re: [R] Need help on "date"

2007-09-18 Thread Frede Aakmann Tøgersen
One way (perhaps not the most efficient) > as.Date("2005-09-01","%Y-%m-%d") [1] "2005-09-01" > format(as.Date("2005-09-01","%Y-%m-%d"),"%Y") [1] "2005" > format(as.Date("2005-09-01","%Y-%m-%d"),"%d") [1] "01" > format(as.Date("2005-09-01","%Y-%m-%d"),"%m") [1] "09" > See ?DateTimeClasses. Med

Re: [R] graphs with gradients of colors

2007-09-18 Thread Jim Lemon
Van Dongen Stefan wrote: > Hi All, > > I would like to fill the area under a curve with a gradient of colors. Are > there any packages or trick I could use > > Hi Stefan, Chris has answered the question of how to define the polygons, so I'll have a shot at the gradient. The plotrix package

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: >

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 standar

Re: [R] Odp: aggregate function oddity

2007-09-18 Thread Gustaf Rydevik
On 9/18/07, Mihalicza Péter <[EMAIL PROTECTED]> wrote: > Sorry for the confusion, I was not clear enough, so I made a small > example to illustrate: > > >m=data.frame(fac1=rep(c(1,2),3), fac2=c("a","b","b","b","a","b"), > num1=1:6, num2=7:12) > > m$fac1=as.factor(m$fac1) > > m > fac1 fac2 num1

[R] Need help on "date"

2007-09-18 Thread Arun Kumar Saha
Dear all, I have a variable 'x' like that: > x [1] "2005-09-01" Here, 2005 represents year, 09 month and 01 day. Now I want to create three variables naming: y, m, and d such that: y = 2005 m = 09 d = 01 can anyone tell me how to do that? Regards, [[alternative HTML version deleted]

Re: [R] Odp: aggregate function oddity

2007-09-18 Thread Mihalicza Péter
Sorry for the confusion, I was not clear enough, so I made a small example to illustrate: >m=data.frame(fac1=rep(c(1,2),3), fac2=c("a","b","b","b","a","b"), num1=1:6, num2=7:12) > m$fac1=as.factor(m$fac1) > m fac1 fac2 num1 num2 11a17 22b28 31b3

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

2007-09-18 Thread 张志杰
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 standardise a variable and

Re: [R] map issues

2007-09-18 Thread Paul Hiemstra
Dear Alexander, You can use the function readShapePoly function from maptools. This directly reads the shapefile into a SpatialPolygons object. You also need to install the sp package (don't know if you did that already). You could consider joining the r-sig-geo mailing list. These kinds of qu

[R] Extracting variance-covariance matrix from nlme object

2007-09-18 Thread Rob Forsyth
I want to extract the variance-covariance matrix of an nlme model of a dataset. The object is to pass this to mvrnorm to create pseudo- replicates of the original data. I note the nlme package has a getVarCov method available for lme objects but not nlme objects. Is the vcov function in the

Re: [R] Sourcing encrypted files

2007-09-18 Thread Mark Wardle
Dear Dennis, Ignoring the reasons why you might want to do this, you may want to explore a ram disk. I don't know which OS you are using, but assume a unix or unix-like OS, there may be a straightforward way to mount a ram-based volatile disk and decrypt your file to there. Another option would b

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 leg

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

[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 discusse