Re: [R] Plot colour according to column

2011-02-08 Thread Jim Lemon
On 02/09/2011 06:49 PM, Jim Lemon wrote: On 02/08/2011 09:14 PM, anoopmj wrote: Hi, I am trying to plot several columns in different graphs in columns and rows. The first column of my data file is the time, and the third is the 'elevation angle' with 19 different numbers. I would like to plot

Re: [R] Plot colour according to column

2011-02-08 Thread Jim Lemon
On 02/08/2011 09:14 PM, anoopmj wrote: Hi, I am trying to plot several columns in different graphs in columns and rows. The first column of my data file is the time, and the third is the 'elevation angle' with 19 different numbers. I would like to plot the rest of the columns with the x axis as

Re: [R] add error bars in a plot

2011-02-08 Thread Gerrit Eichner
Hello, Maria, take a look at ?errbar in the package Hmisc. Hth -- Gerrit Dear all I have a dataset of how metal concentrations change through time. I have made a plot of date versus metal concentration. However I want to add error bars in the plot. Could you help me? Thanks Maria

Re: [R] help with operations inside matrix

2011-02-08 Thread Petr Savicky
On Tue, Feb 08, 2011 at 07:50:26PM -0800, Frenando wrote: > > Hello World! > I'm working on my thesis right now (something about financial immunization) > I'm currently working in the basics, doing a matrix that lists the present > value (or weight) of every combination of coupon rate and term to

[R] add error bars in a plot

2011-02-08 Thread Lathouri, Maria
Dear all I have a dataset of how metal concentrations change through time. I have made a plot of date versus metal concentration. However I want to add error bars in the plot. Could you help me? Thanks Maria [[alternative HTML version deleted]] ___

[R] merge, rbind, merge.zoo? adding new rows to existing data.frame

2011-02-08 Thread Ad Flan
Hi all, I'm trying to add updated data to an existing time series where an overlap exists. I need to give priority to the update data. My script runs every morning to collect data the updated data. There are quite often varied lengths, so once off solutions identifying rows to solve this example wo

Re: [R] as.Date

2011-02-08 Thread Valeri Fabio
Thanks for the reply. The original test was without the quote. The quote come into play when I try to solve this problem changing from " to '. However, after restarting my PC the as.Date(36525, origin="1900-01-01") gaves me the correct output [1] "2000-01-02" After loading several libraries I

Re: [R] Interactions in a nls model

2011-02-08 Thread Gabor Grothendieck
On Tue, Feb 8, 2011 at 11:43 PM, Gabor Grothendieck wrote: > On Tue, Feb 8, 2011 at 4:12 PM, Anthony Lawrence Nguy-Robertson > wrote: >> I am interested in testing two similar nls models to determine if the lines >> are statistically different when fitted with two different data sets; one >> corn

Re: [R] multicore + xeon ?

2011-02-08 Thread Patrick Connolly
On Wed, 02-Feb-2011 at 04:10AM -0800, kv wrote: |> |> Is there any reason to expect a problem ? |> i'm running this script on the cluster down the hall: I don't think multicore is what you need. It's for a single multicore machine. It works fine on my dual-core machine. For a cluster, you nee

Re: [R] Iterate over a list of input files?

2011-02-08 Thread Tsjerk Wassenaar
Hi Mark, If you have a function that, for a given file name, returns the data in the way you want, then you can use 'dir' or 'paste' to generate a list of names, which you can read in in one go with apply: my_read <- function(filename) { ... } filenames <- dir(directory,pattern) filenames <- pa

[R] help with operations inside matrix

2011-02-08 Thread Frenando
Hello World! I'm working on my thesis right now (something about financial immunization) I'm currently working in the basics, doing a matrix that lists the present value (or weight) of every combination of coupon rate and term to maturity, this is the code I have right now which is giving me a "

Re: [R] Use glm coefficients for other datasets

2011-02-08 Thread maxsilva
Thank you for your kindness, but ive done what you've said and the problem remains. What im doing is pretty straightforward, >data response pred1 pred2 1 1 01 2 0 00 3 1 00 4 1 11 5 1 01 6 0 11 7 1 1

[R] Extracting content from web

2011-02-08 Thread Deb Midya
Hi R Users,   Thanks in advance.   I am using R-2.12.1 on Windows XP.   May I request you to assist me for the following please.   Is there any R-package or R Script to extract content(s) from web.   Once again, thank you very much for the time you have given.   Regards,   Deb   [[

Re: [R] Interactions in a nls model

2011-02-08 Thread Gabor Grothendieck
On Tue, Feb 8, 2011 at 4:12 PM, Anthony Lawrence Nguy-Robertson wrote: > I am interested in testing two similar nls models to determine if the lines > are statistically different when fitted with two different data sets; one > corn, another soybean. I know I can do this in linear models by testing

Re: [R] Removing Outliers Function

2011-02-08 Thread David Winsemius
Exactly right. I use the phrase to catch the unwary's attention. I think the effect is properly placed on the y-axis. IIRC, Ben Bolker (or was it Bert Gunter?) has also commented in the R- help or r-devel pages this curious inversion of functional meaning. -- David On Feb 8, 2011, at 10:36

Re: [R] Removing Outliers Function

2011-02-08 Thread Ravi Varadhan
David, Please allow me to digress a lot here. You are one of the few (inlcuding yours truly!) that uses the phrase "shallow learning curve" to indicate difficulty of learning (I assume this is what you meant). I always felt that "steep learning curve" was incorrect. If you plotted the amount

Re: [R] Removing Outliers Function

2011-02-08 Thread David Winsemius
On Feb 8, 2011, at 9:11 PM, kirtau wrote: I am working on a function that will remove outliers for regression analysis. I am stating that a data point is an outlier if its studentized residual is above or below 3 and -3, respectively. The code below is what i have thus far for the funct

[R] newbie Question on Generic and Method

2011-02-08 Thread Laura Smith
Hi! Here is a newbie question, please: what is the difference between a generic and a method? Thanks, Laura [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Parallel processing question ...

2011-02-08 Thread Steve Lianoglou
Hi, On Tue, Feb 8, 2011 at 6:18 PM, Robinson, David G wrote: > I am experimenting with parallel processing using foreach and seem to be > missing something fundamental. Cool stuff. I've gone through the list and > seen a couple of closely related issues, but nothing I've tried seems to > work. >

Re: [R] SEM: question regarding how standard errors are calculated

2011-02-08 Thread Ned Dochtermann
Dr. Fox, Thank you for the reply. The discrepancy between lm and the sem package as well as AMOS makes sense given how the se's are calculated for linear models. This is a small dataset with non-normal data (part of the reason for my last comment) which might contribute to the relatively large disc

Re: [R] Grouping by factors in R

2011-02-08 Thread Christopher R. Dolanc
I'm working on getting this to work - need to figure out how to extract pieces properly. In the mean time, I may have figured out an alternate method to group the factors by the following: > stems139$SpeciesF <- factor(stems139$Species) > stems139GLM <- glm(Stems ~ Time*SizeClassF*Species, f

[R] Parallel processing question ...

2011-02-08 Thread Robinson, David G
I am experimenting with parallel processing using foreach and seem to be missing something fundamental. Cool stuff. I've gone through the list and seen a couple of closely related issues, but nothing I've tried seems to work. I know that the results from foreach are combined, but what if there is

[R] Removing Outliers Function

2011-02-08 Thread kirtau
I am working on a function that will remove outliers for regression analysis. I am stating that a data point is an outlier if its studentized residual is above or below 3 and -3, respectively. The code below is what i have thus far for the function x = c(1:20) y = c(1,3,4,2,5,6,18,8,10,8,11,13,14

Re: [R] Interactions in a nls model

2011-02-08 Thread Anthony Lawrence Nguy-Robertson
Bert, Thanks for the input. I was hoping for an easy answer, but as life is, there usually isn't one. I will find a statistician here on campus that might be able to help. Just so you know, the data is remote sensing data that is an average of 9 measurements on one day. However, the data set

Re: [R] Iterate over a list of input files?

2011-02-08 Thread dunner
Quick and dirty answer: Try ?paste in conjunction with a "for" loop which iterates over i:length(Files), and you can paste "i" onto the end of your filename, then add the data to cd=list(), cd[i], then "unlist" the data or as.data.frame(cd). I'm sure there are more elegant alternatives. Ross --

Re: [R] SEM: question regarding how standard errors are calculated

2011-02-08 Thread John Fox
Dear Ned, > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Ned Dochtermann > Sent: February-08-11 6:07 PM > To: r-help@r-project.org > Subject: [R] SEM: question regarding how standard errors are calculated > > Sorry if this qu

[R] Iterate over a list of input files?

2011-02-08 Thread Mark Knecht
Hi, I've got the following code which seems to work fine for a single file if I specify the file name explicitly in the code. What I need to do is run it on all the files in the directory tested and augment the data frame I'm building to have more results columns.How can I do that? Here's th

Re: [R] multiple imputation manually

2011-02-08 Thread Daisy Englert Duursma
Hello, I don't really understand you question but if you want to run the same code four or five times on the same dataset you could write it into a for loop where yourread in your incomplete dataset back in at the beginning. A better practice is to change the name of a dataset when you make chang

Re: [R] Interactions in a nls model

2011-02-08 Thread Bert Gunter
Nonlinear models are an entirely different kettle of fish then linear models. You need to specify exactly how the different crops affect the parameters in your growth model. I suggest you consult a local statistician for help (this is not an R question). Incidentally, depending on the nature of yo

[R] SEM: question regarding how standard errors are calculated

2011-02-08 Thread Ned Dochtermann
Sorry if this question has been asked previously, I searched but found little. There also doesn't seem to be a dedicated SEM list-serv so hopefully this will find its way to the appropriate audience. In discussing SEM with a colleague I mentioned that a model they were fitting in AMOS was equiv

Re: [R] Just another pattern matching / indexing question

2011-02-08 Thread Denis Kazakiewicz
For the sake of simplicity I've made your data example idd d1 d2 d3 d4 1 a d b c 2 a d v h 3 c b v NA 4 q v NA f df <- read.table('clipboard', header = TRUE,na.strings="NA") df

Re: [R] which multivariate regression?

2011-02-08 Thread Denis Kazakiewicz
Dear Andrew Halford Here just merely a suggestion of R newbie without sufficient statistical background MCMCpoisson from package MCMCpack Could you please lately post the answer to your very interesting question when you will find it. Wit best regards Denis У Аўт, 08/02/2011 у 14:38

Re: [R] Removing X and Y labels in graph error

2011-02-08 Thread poolmunch
Hey thanks for all the help, I did end up using layout, par, mar to reduce the labelling area and combine it with other plots. I also now understand NULL was the wrong argument to place in the field. Thanks again -- View this message in context: http://r.789695.n4.nabble.com/Removing-X-and-Y

Re: [R] intervals {nlme} lower CI greater than upper CI !!!????

2011-02-08 Thread Ben Bolker
Federico Bonofiglio gmail.com> writes: > You're confused by the formatting differences betwen columns. The first column uses 'standard' notation, the second and third use 'scientific' notation -- see comments inline. > > GLU<-lme(gluc~rt*cd4+sex+age+rf+nadir+pharmac+factor(hcv)+factor(hbs)+

Re: [R] Plot using treatment letter as points

2011-02-08 Thread Greg Snow
xyplot is a lattice plotting command, text is a base plotting command. The 2 types don't play well together without extra work. The base command plot with text is probably the easiest, or you can just use plot and pch: > with(iris, plot(Sepal.Width, Sepal.Length, pch=c('s','e','i')[Species] )

Re: [R] Removing X and Y labels in graph error

2011-02-08 Thread Eik Vettorazzi
Have a look at ?par especially the "mar" argument, to get rid off the boundaries reserverd for labelling. Am 08.02.2011 21:36, schrieb poolmunch: > > Hello, had a quick search on the site but no luck. > > Heres my problem, when attempting to xlab = NULL and ylab = NULL it displays > > x[[1L]]

Re: [R] Removing X and Y labels in graph error

2011-02-08 Thread Greg Snow
If you want to expand the area that the graph takes up (using the space that the labels would have been in) look at the "mar" part of ?par. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-h

Re: [R] Grouping by factors in R

2011-02-08 Thread Dennis Murphy
Hi: One approach would be to use dlply() from the plyr package to generate the models and assign the results to a list, something like the following: library(plyr) # function to run the GLM in each data subset - the argument is a generic data subset d gfun <- function(d) glm(Stems ~ Time, data =

Re: [R] [Rd] manipulating the Date & Time classes

2011-02-08 Thread Simon Urbanek
Mike, On Feb 8, 2011, at 3:24 PM, Mike Williamson wrote: > Hello, > >This is mostly to developers, but in case I missed something in my > literature search, I am sending this to the broader audience. > > > - Are there any plans in the works to make "time" classes a bit more > friendly

Re: [R] delete a row in dataframe w/o changing indexing

2011-02-08 Thread David Winsemius
On Feb 8, 2011, at 4:54 PM, Nicolas Gutierrez wrote: Hi All, I'm trying to delete a row from my dataframe "pop" without changing the indexing (column 0) as follows: >pop id birth size xloc yloc weight energy gonad consumed 1 136 13 34 43 0 18 00 2 2

Re: [R] Use glm coefficients for other datasets

2011-02-08 Thread Greg Snow
What happens if you use the "newdata" argument name instead of "data"? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On

Re: [R] Convert the output of by() to a data frame

2011-02-08 Thread Matthew Dowle
There's a much shorter way. You don't need that ugly h() with all those $ and potential for bugs ! Using the original f : dt[,lapply(.SD,f),by=key(dt)] grp1 grp2 grp3 a b d xxx 1.00 81.00 161.00 xxx 10.00 90.00 17

Re: [R] Removing X and Y labels in graph error

2011-02-08 Thread David Winsemius
On Feb 8, 2011, at 3:36 PM, poolmunch wrote: Hello, had a quick search on the site but no luck. Heres my problem, when attempting to xlab = NULL and ylab = NULL it displays Those are the default settings: ?plot.default ... , xlab = NULL, ylab = NULL, ... xlab a label for the x

Re: [R] Removing X and Y labels in graph error

2011-02-08 Thread Phil Spector
Contrast the behaviour of these two statements: plot(x,y,xlab=NULL,ylab=NULL) plot(x,y,xlab='',ylab='') In other words, use xlab='' to supress the label, not NULL. - Phil Spector Statistical Computing Facility

Re: [R] delete a row in dataframe w/o changing indexing

2011-02-08 Thread Phil Spector
Nicolas - I don't think it can be done automatically, but you can use row.names(pop) = 1:nrow(pop) after deleting the column(s) to restore consecutive numbers for the row names. - Phil Spector Statistical Comp

Re: [R] intervals {nlme} lower CI greater than upper CI !!!????

2011-02-08 Thread Eik Vettorazzi
Hi, there is nothing to complain?! 0.0148 < 6.24e-02=0.0624 < 1.1e-01 = 0.11 same for the 5th line. so I didn't get the point. Am 08.02.2011 22:14, schrieb Federico Bonofiglio: > Hi folks... > > check this out.. > >> GLU<-lme(gluc~rt*cd4+sex+age+rf+nadir+pharmac+factor(hcv)+factor(hbs)+ > + h

Re: [R] Use glm coefficients for other datasets

2011-02-08 Thread Ben Bolker
maxsilva uc.cl> writes: > > > Thank you for your answer. But I still have the problem; for example, if i > have data for 10 months, estimate the parameters of my logit model using 10 > months of data, and then use > > predictions<-predict(model,data=1monthonly,family = binomial(link = > logit)

Re: [R] Plot where points are treatment letter

2011-02-08 Thread David Winsemius
On Feb 8, 2011, at 3:42 PM, Schatzi wrote: I would like to create a plot of y vs x with different treatments where the points are actually the letter of the treatment. Here is the code: A<-as.matrix(rnorm(10,10)) B<-as.matrix(rnorm(10,9.5)) C<-as.matrix(rnorm(10,10.5)) Y<-as.matrix(rnorm(3

[R] delete a row in dataframe w/o changing indexing

2011-02-08 Thread Nicolas Gutierrez
Hi All, I'm trying to delete a row from my dataframe "pop" without changing the indexing (column 0) as follows: >pop id birth size xloc yloc weight energy gonad consumed 1 136 13 34 43 0 18 00 2 236 10 39 38 0 18 00 3 3

Re: [R] manipulating the Date & Time classes

2011-02-08 Thread Phil Spector
Mike - apply turns its argument into an array (in this case a matrix), which can't accomodate dates. To operate on the rows of a data frame, your best bet is probably to use a for loop. There's no reason to dread loops in R -- just try to avoid growing objects inside a loop by preallocatin

Re: [R] Recuperate Spectrum() amplitude

2011-02-08 Thread Mike Marchywka
> Date: Tue, 8 Feb 2011 17:34:15 + > From: marie.guil...@bordeaux.inra.fr > To: r-help@r-project.org > Subject: [R] Recuperate Spectrum() amplitude > > Dear list, > I put the code I use here to understand if the difference comes from the >

Re: [R] Error in example Glm rms package

2011-02-08 Thread Ben Bolker
anna freni sterrantino yahoo.it> writes: > I've got this error while running > > example(Glm) > > library("rms") > > example(Glm) [snip] > Glm> f <- Glm(counts ~ outcome + treatment, family=poisson()) > Error in Design(eval(mf, parent.frame())) : > dataset dd not found for options(datadist

Re: [R] Extrcat selected rows from a list

2011-02-08 Thread Dennis Murphy
Hi: Try some modification of the following toy example: df <- data.frame(names = as.character(replicate(100, paste(sample(letters, 3), collapse = ''))), x1 = rnorm(100), x2 = rnorm(100)) tgts <- sample(df$names, 20)# target list of names df[df$names %in% tgts, ] # yiel

Re: [R] intervals {nlme} lower CI greater than upper CI !!!????

2011-02-08 Thread David Winsemius
On Feb 8, 2011, at 4:14 PM, Federico Bonofiglio wrote: Hi folks... check this out.. GLU<-lme(gluc~rt*cd4+sex+age+rf+nadir+pharmac+factor(hcv) +factor(hbs)+ + haartd+hivdur+factor(arv), + random= ~rt|id, na.action=na.omit) intervals(GLU)$fixed lower est.

Re: [R] Plot using treatment letter as points

2011-02-08 Thread poolmunch
in ?plot it says that type ="n" displays everything but the actual points, so that you can display the characters on top using the text function -- View this message in context: http://r.789695.n4.nabble.com/Plot-using-treatment-letter-as-points-tp3276743p3276804.html Sent from the R help mailin

Re: [R] Plot where points are treatment letter

2011-02-08 Thread Peter Langfelder
Here's an example: x = c(1,2,3,4,5); y = rnorm(5); labels = LETTERS[1:5]; plot(x,y, type = "n") # This sets up the plot but doesn't actually plot the points text(x,y, labels) # This adds labels to positions (x,y) HTH, Peter On Tue, Feb 8, 2011 at 12:42 PM, Schatzi wrote: > > I would like to

Re: [R] Plot using treatment letter as points

2011-02-08 Thread poolmunch
xyplot(Y~X,groups = TRT,type=n) to plot the space but not the points, then use the text function to display the characters. Try ?text in R -- View this message in context: http://r.789695.n4.nabble.com/Plot-using-treatment-letter-as-points-tp3276743p3276775.html Sent from the R help mailing l

[R] Interactions in a nls model

2011-02-08 Thread Anthony Lawrence Nguy-Robertson
I am interested in testing two similar nls models to determine if the lines are statistically different when fitted with two different data sets; one corn, another soybean. I know I can do this in linear models by testing for interactions. See Introductory Statistics with R by Dallgaard p212-21

[R] Removing X and Y labels in graph error

2011-02-08 Thread poolmunch
Hello, had a quick search on the site but no luck. Heres my problem, when attempting to xlab = NULL and ylab = NULL it displays x[[1L]] and X[[2L]] as labels on the axis. plot(USSenate[,1:2],col=c("blue","grey","red")[unclass(USSenate$Senate)],pch=unclass(USSenate$Senate), type="n",xaxt="n", y

Re: [R] Subsampling out of site*abundance matrix

2011-02-08 Thread B77S
It is a lot prettier than mine too. Thanks Jari. > rrarefy function (x, sample) { if (length(sample) > 1 && length(sample) != nrow(x)) stop("length of 'sample' and number of rows of 'x' do not match") sample <- rep(sample, length = nrow(x)) colnames(x) <- colnames(x, do.NULL

Re: [R] Use glm coefficients for other datasets

2011-02-08 Thread maxsilva
Thank you for your answer. But I still have the problem; for example, if i have data for 10 months, estimate the parameters of my logit model using 10 months of data, and then use predictions<-predict(model,data=1monthonly,family = binomial(link = logit),type="response") I still get the rpedict

Re: [R] Plotting Chinese characters

2011-02-08 Thread apepe
Prof Brian Ripley wrote: > > Well, no, it doesn't (it plots on the screen device). So exactly how > are you producing the plot? > I am trying to produce a visualization of the character network, like this: > plot(g, layout=layout.fruchterman.reingold, vertex.color="black", > vertex.size=2.0,

[R] intervals {nlme} lower CI greater than upper CI !!!????

2011-02-08 Thread Federico Bonofiglio
Hi folks... check this out.. > GLU<-lme(gluc~rt*cd4+sex+age+rf+nadir+pharmac+factor(hcv)+factor(hbs)+ + haartd+hivdur+factor(arv), + random= ~rt|id, na.action=na.omit) > intervals(GLU)$fixed lower est. upper (Intercept) 67.3467070345 7.362307e+01

Re: [R] "strange" behavior of panel.abline inside a for-loop

2011-02-08 Thread rex.dwyer
Dear Marius, Try this: plot.list = lapply(1:10, function(i) xyplot(i~i,type="p",xlim=c(0,11),panel=function(...) { panel.xyplot(...); panel.abline(v=i)}) ) plot.list[[3]] I imagine it will work for Mr Luftjammer, too. Rex -Original Message- From: r-help-boun...@r-project.org [ma

Re: [R] [Rd] manipulating the Date & Time classes

2011-02-08 Thread Daniel Cegiełka
try xts package and functions: reclass period.max period.min best, daniel 2011/2/8 Mike Williamson > Hello, > >This is mostly to developers, but in case I missed something in my > literature search, I am sending this to the broader audience. > > > - Are there any plans in the works to ma

[R] Grouping by factors in R

2011-02-08 Thread Christopher R. Dolanc
I'm having a hard time figuring out how to group results by certain factors in R. I have data with the following headings: [1] "Time" "Plot" "LatCat""Elevation" "ElevCat" "Aspect""AspCat""Slope" [9] "SlopeCat" "Species" "SizeClass" "Stems" and I'm trying to use a G

Re: [R] Four parameter logistics.

2011-02-08 Thread Victor F Seabra
try the code below, if you use different upper and lower limits you might get different parameter estimates HTH, Victor standard.curve<-data.frame(conc=c(50, 25, 12.5, 6.25, 3.125, 1.563, 0.781,50, 25, 12.5, 6.25, 3.125, 1.563, 0.781),absorb=c(1.918, 1.251, 1.104, 0.719, 0.403, 0.177, 0.083,1.9

[R] glht{multcomp} : use with lme {nlme}

2011-02-08 Thread Federico Bonofiglio
Hi dears, I do > CHOL<-lme(chol~rt*cd4+sex+age+rf+nadir+pharmac+factor(hcv)+factor(hbs)+ haartd+hivdur+factor(arv), random= ~rt|id, na.action=na.omit) ...runs sweet,..then try a multicomparisons approach for the categorical rf > summary(glht(CHOL, linfct=mcp(rf="Tukey"))) * Error in model

[R] Plot where points are treatment letter

2011-02-08 Thread Schatzi
I would like to create a plot of y vs x with different treatments where the points are actually the letter of the treatment. Here is the code: A<-as.matrix(rnorm(10,10)) B<-as.matrix(rnorm(10,9.5)) C<-as.matrix(rnorm(10,10.5)) Y<-as.matrix(rnorm(30,13)) X<-rbind(A,B,C) nA<-matrix("A",10,1)

Re: [R] Mixed font type in plot title

2011-02-08 Thread john polo
On 2/8/2011 3:13 PM, Duncan Murdoch wrote: expression(paste(italic( "Q. marilandica "), " volume")) Thank you. -- "If people sat outside and looked at the stars each night, I'll bet they'd live a lot differently."- Bill Watterson __ R-help@r-project

Re: [R] Plot using treatment letter as points

2011-02-08 Thread Schatzi
Great. Thanks. Here is the new code: xyplot(Y~X,groups = TRT,type="n") text(x,y,labels=TRT) -- View this message in context: http://r.789695.n4.nabble.com/Plot-using-treatment-letter-as-points-tp3276743p3276808.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Mixed font type in plot title

2011-02-08 Thread Duncan Murdoch
On 08/02/2011 4:07 PM, john polo wrote: Hello useRs, I'm trying to put italics and regular font into a title and am having some trouble. The title I would like is " /Q. marilandica/ Volume ". Use expression(paste(italic( "Q. marilandica "), " volume")) Duncan Murdoch If I use main=bquote(i

[R] Mixed font type in plot title

2011-02-08 Thread john polo
Hello useRs, I'm trying to put italics and regular font into a title and am having some trouble. The title I would like is " /Q. marilandica/ Volume ". If I use main=bquote(italic( "Q. marilandica ", " volume")) I get just " Q. marilandica " in italics in the title. If i use main=bquote(italic

Re: [R] manipulating the Date & Time classes

2011-02-08 Thread Mike Williamson
Phil, Thanks! I am not sure why min & max sometimes work & other times don't work. In fact, running the script as you had it did work for me. For arrays that I had, it wasn't working and still isn't. For the moment, I won't worry about it. It seems maybe it is a hidden bug somewhere (or I

Re: [R] please hep in uniform distribution

2011-02-08 Thread Greg Snow
You are comparing B[1] to A[1]^2, then B[2] to A[2]^2 etc. so for the AB pairs you are doing the comparison. If that is what you want, then it is fine. But if you want to compare the 1st B to all the A's, then the 2nd B to all the A's, etc. Then it does not do this (but the expand.grid functi

Re: [R] Proportions comparison

2011-02-08 Thread Greg Snow
How do you anticipate the number of doctors affecting the proportions? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On

Re: [R] Fitting a model with an offset in bigglm

2011-02-08 Thread Ben Bolker
Dennis Murphy gmail.com> writes: > > Hi: > > Did you try putting the offset in the model formula, as in > > bigglm( y ~ offset(z) + x, ...) ? > > I haven't tried bigglm() personally (BTW, it's in the biglm package, which > wasn't mentioned), but this syntax works in the standard glm() fu

Re: [R] Title

2011-02-08 Thread David Scott
On 9/02/2011 6:25 a.m., David Winsemius wrote: On Feb 8, 2011, at 11:43 AM, kateF87 wrote: I have a relatively simple question. I am trying to post a title to a plot using a symbol and multiple lines. Right now I have: title(main = c('Hazard Ratio for women with score', expression('>='), 'A

Re: [R] "strange" behavior of panel.abline inside a for-loop

2011-02-08 Thread Marius Hofert
Yep, that finally does it. Many thanks, Rex. Cheers, Marius On 2011-02-08, at 21:11 , wrote: > Dear Marius, > Try this: > > plot.list = lapply(1:10, > >function(i) xyplot(i~i,type="p",xlim=c(0,11),panel=function(...) { >panel.xyplot(...); panel.abline(v=i)}) > ) > plot.list[[3]] >

[R] manipulating the Date & Time classes

2011-02-08 Thread Mike Williamson
Hello, This is mostly to developers, but in case I missed something in my literature search, I am sending this to the broader audience. - Are there any plans in the works to make "time" classes a bit more friendly to the rest of the "R" world? I am not suggesting to allow for fancy

Re: [R] help on stepfunction

2011-02-08 Thread David Winsemius
On Feb 8, 2011, at 2:35 PM, Mauro Ferreira wrote: Dear members, I would like a help for extracting the values from a step function (stepfun). From help(stepfun) we have the following example: Y0<-c(1.,2.,4.,3.) y0<-c(1.,2.,3.,4.) sfun<-stepfun(1:3,y0,f=0) plot(sfun) Now, suppose instead I

Re: [R] Stopping between multiple graphs

2011-02-08 Thread Greg Snow
Look at ?par and specifically the ask option. Or, you can use the pdf function to send a set of graphs directly to a pdf file, then open the pdf file and step through (and go back if you want) the graphs. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s..

Re: [R] Fitting a model with an offset in bigglm

2011-02-08 Thread Dennis Murphy
Hi: Did you try putting the offset in the model formula, as in bigglm( y ~ offset(z) + x, ...) ? I haven't tried bigglm() personally (BTW, it's in the biglm package, which wasn't mentioned), but this syntax works in the standard glm() function, so perhaps it maps to bigglm() as well... (?)

Re: [R] Use glm coefficients for other datasets

2011-02-08 Thread Ben Bolker
maxsilva uc.cl> writes: > I generated a glm logit model using a sample of a bigger set, and now I want > to test the model with the bigger set. How can I do this? predict makes > predictions only for a number of rows equal to the sample used. The question > is, how can I use the coefficients of

Re: [R] help

2011-02-08 Thread Peter Ehlers
On 2011-02-08 11:17, wang peter wrote: my program run well on my Pc but when run one the server(linux),it meet the error Error in match.fun(FUN) : could not find function "Negate" Is Negate your own function or is it the function in the base package? If the latter, check your R versions (which

Re: [R] Perform one-way ANOVA using standard deviation and mean

2011-02-08 Thread Greg Snow
Another approach (still using the theory of sufficient statistics) is to generate data from a normal distribution that matches exactly the sizes, means, and standard deviations that you have, then analyze the simulated data. The mvrnorm function in the MASS package can generate data with a given

Re: [R] Unbalanced Mixed Linear Models With Nested Stratum

2011-02-08 Thread dunner
Hi, I have found Pinheiro and Bates an absolute godsend for mixed modelling, http://www.amazon.com/Mixed-Effects-Models-S-S-Plus/dp/0387989579 alternatively, there is a REALLY good chapter in the 3rd edition of DAAG: http://www.amazon.com/Data-Analysis-Graphics-Using-Example-Based/dp/05217629

Re: [R] p-value for y in non-parametric distribution, Y

2011-02-08 Thread Sascha Vieweg
On 11-02-07 19:21, Sascha Vieweg wrote: Hello, knowing that some index y, with y(341)=2, SE=3, is t-distributed, I (think I) can find an appropriate (left/one-sided) p-value with R: y <- 2 R: yse <- 3 R: (p <- 1-pt(y/yse, df=341)) Now, some simulation resulted in the non-parametric distrib

Re: [R] help

2011-02-08 Thread Marc Schwartz
On Feb 8, 2011, at 1:17 PM, wang peter wrote: > my program run well on my Pc > but when run one the server(linux),it meet the error > Error in match.fun(FUN) : could not find function "Negate" > thx > peter The Negate() function was introduced in base R version 2.7.0, which was released about t

[R] Use glm coefficients for other datasets

2011-02-08 Thread maxsilva
Dear R people, I generated a glm logit model using a sample of a bigger set, and now I want to test the model with the bigger set. How can I do this? predict makes predictions only for a number of rows equal to the sample used. The question is, how can I use the coefficients of a glm with other s

[R] Just another pattern matching / indexing question

2011-02-08 Thread dunner
Hi all, thank you for your patience. I am dealing with a large dataset detailing patients and medications Medications are hard to code, as they are (usually) meaningless unless matched with doses. I have a dataframe with vectors (Drug1, Drug2. Drug 16) and individual patients are represente

Re: [R] Frequency plot --- stacked symbols

2011-02-08 Thread David Arnold
Hi, This was a terrific suggestion. I'm no expert in R, but I managed to find and read the axis command to do the following. x=c(rep(2,14),rep(4,13),rep(6,11),rep(8,4),rep(10,3),rep(12,2),14,16,18) stripchart(x,method="stack",pch=21,at=0,bg="lightblue",col="blue",offset=.5,cex=1.5,xlab="Bag B"

[R] help

2011-02-08 Thread wang peter
my program run well on my Pc but when run one the server(linux),it meet the error Error in match.fun(FUN) : could not find function "Negate" thx peter [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] help on stepfunction

2011-02-08 Thread Mauro Ferreira
Dear members, I would like a help for extracting the values from a step function (stepfun). >From help(stepfun) we have the following example: Y0<-c(1.,2.,4.,3.) y0<-c(1.,2.,3.,4.) sfun<-stepfun(1:3,y0,f=0) plot(sfun) Now, suppose instead I was given the object (*sfun*, say) from which I wanted

Re: [R] Keep date, strip time?

2011-02-08 Thread Mark Knecht
On Tue, Feb 8, 2011 at 11:29 AM, Phil Spector wrote: > Mark - >   Here's a few possibilites: > >> dts = c('6/10/2009 10:04:00 AM','6/15/2009 9:47:00 AM','6/15/2009 9:47:00 >> AM') >> as.Date(sapply(strsplit(dts,' '),'[',1),'%m/%d/%Y') > > [1] "2009-06-10" "2009-06-15" "2009-06-15" >> >> as.Date(su

Re: [R] Keep date, strip time?

2011-02-08 Thread Mark Knecht
On Tue, Feb 8, 2011 at 11:30 AM, Prof Brian Ripley wrote: > Try as.Date() with a suitable format (it only knows about internationally > standard formats), e.g. maybe you mean > >> as.Date("6/10/2009 10:04:00 AM", format="%m/%d/%Y") > > [1] "2009-06-10" > Thank you! - Mark __

Re: [R] Keep date, strip time?

2011-02-08 Thread Prof Brian Ripley
Try as.Date() with a suitable format (it only knows about internationally standard formats), e.g. maybe you mean as.Date("6/10/2009 10:04:00 AM", format="%m/%d/%Y") [1] "2009-06-10" On Tue, 8 Feb 2011, Mark Knecht wrote: I have hundreds of CSV files coming in from another program that have

Re: [R] Frequency plot --- stacked symbols

2011-02-08 Thread Eik Vettorazzi
Hi, either upscale the circles (increase cex) or narrow your plot, as in x11(3,5) stripchart(x,method="stack",pch=21,at=0,bg="lightblue",col="blue",offset=.5,cex=1.5,xlab="Bag B",frame.plot=FALSE,axes=FALSE) there's a trade off between 'closing the gap' and having all your ticks readable, so just

Re: [R] Keep date, strip time?

2011-02-08 Thread Phil Spector
Mark - Here's a few possibilites: dts = c('6/10/2009 10:04:00 AM','6/15/2009 9:47:00 AM','6/15/2009 9:47:00 AM') as.Date(sapply(strsplit(dts,' '),'[',1),'%m/%d/%Y') [1] "2009-06-10" "2009-06-15" "2009-06-15" as.Date(sub('(\\d+/\\d+/\\d+) .*','\\1',dts),'%m/%d/%Y') [1] "2009-06-10" "2009-06

Re: [R] Plotting Chinese characters

2011-02-08 Thread Prof Brian Ripley
On Tue, 8 Feb 2011, apepe wrote: Hi, I have read some of the documentation relative to character encodings and non-standard fonts (including previous answered questions and the 2006-2 R issue), but I am still struggling with very basic plotting of Chinese text. I am using R for Mac OS X GUI 1

  1   2   >