[R] two ggplot and colour=x question

2006-12-11 Thread Rainer M Krug
Hi I am using ggplot with the aesthetic=list(..., colour=x, ...) ggplot() ggline() I have four different values in x (ren, cyn, mixed, bare) and I have two questions 1) I would like to assign specific colours to the values, i.e. green, red, blue and brown. How can I do this? I did not

Re: [R] cohen kappa for two-way table

2006-12-11 Thread Jim Lemon
Dylan Beaudette wrote: Greetings, I am a bit confused by the results returned by the functions: cohen.kappa {concord} classAgreement {e1071} when using a two-way table. for example, if I have an matrix A, and a similar matrix B (same dimensions), then: matrix A and B can be

Re: [R] R2WinBUGS and calling WinBUGS in Crossover MAC BETA

2006-12-11 Thread Kenneth Benoit
Ben Bolker wrote: Kenneth Benoit kbenoit at tcd.ie writes: Hi there - I have a question for any of you who use R2WinBUGS to call WinBUGS using the useWINE option in that package. I have Codeweaver's Crossover emulator installed on my Intel Mac with WinBUGS working fine if I start it from

[R] Switch and integer

2006-12-11 Thread Knut Krueger
I searched the help list and the manual, but I do not find my mistake. Switch is working with character , with integer, but not in the third example Regards Knut count1 - 0 test =c(3,9,3,9,3,9,8,9,8,9,8,9,3,9,3,9,5,9,3,9,1,2,7,9,3,9,1,1,2,2,3,9,2,1,2,5,9,8,9,1,2) count1 - 0 for (i in

Re: [R] barplot - how to force vertical axis to cover entire plot area

2006-12-11 Thread Ricardo Rodríguez - Your XEN ICT Team
Hi, Etienne, I've seen this while working with barplot and never been able to understand the general rule, but by setting ylim high enough, I've always been able to draw a y axis covering the biggest values. Could you send a data subset to reproduce the issue? Thanks. Best, Ricardo --

Re: [R] Switch and integer

2006-12-11 Thread David Barron
From the help entry for switch: If the value of EXPR is an integer between 1 and nargs()-1 then the corresponding element of ... is evaluated and the result returned. So, for integers you don't give names to the elements in ... This should work:

Re: [R] Switch and integer

2006-12-11 Thread Dieter Menne
Knut Krueger Knut-krueger at einthal.de writes: Switch is working with character , with integer, but not in the third example ... # not working test = c(3,9,3,9,3,9,8,9,8,9,8,9,3,9,3,9,5,9,3,9,1,2,7,9,3,9,1,1, 2,2,3,9,2,1,2,5, 9,8,9,1,2) count1 - 0 for (i in 1:length(test))

[R] Experimental Design with R

2006-12-11 Thread Eric Rexstad
Erin: You may want to examine this PDF in the contributed documentation area of R-project: http://cran.r-project.org/doc/contrib/Vikneswaran-ED_companion.pdf -- Eric Rexstad Research Unit for Wildlife Population Assessment Centre for Research into Ecological and Environmental Modelling

Re: [R] solving non linear system of eq

2006-12-11 Thread Dieter Menne
Paulino Perez Rodriguez perpdgo at colpos.mx writes: How can I solve a non linear system of equations using R? Have your tried to enter nonlinear equations into http://search.r-project.org? Dieter __ R-help@stat.math.ethz.ch mailing list

Re: [R] FW: R

2006-12-11 Thread Da . McPhee
Hi Ricky / AJ Progress of sorts. I got passed the last problem by looking at the makefiles but run in to the next one, see below. It has created files in /contrib/R-2.4.0. there is an R under /contrib/R-2.4.0/bin/R. Running it gives :- /contrib/R-2.4.0/bin/R R version 2.4.0 (2006-10-03)

[R] Weighted averaging partial least squares regression

2006-12-11 Thread Andreas Plank
Hello, is it possible in R to calculate a Weighted averaging partial least squares regression? I'm not firm in statistics and didn't found anything about weighted averaging in combination with PLS in the help archives. Or is it possible to develop a workaround with the pls-package? thanks for

Re: [R] FW: R

2006-12-11 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: Hi Ricky / AJ Progress of sorts. I got passed the last problem by looking at the makefiles but run in to the next one, see below. It has created files in /contrib/R-2.4.0. there is an R under /contrib/R-2.4.0/bin/R. Running it gives :-

[R] (no subject)

2006-12-11 Thread Dedy Angsana
Want to start your own business? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Switch and integer

2006-12-11 Thread Knut Krueger
David Barron schrieb: If the value of EXPR is an integer between 1 and nargs()-1 then the corresponding element of ... is evaluated and the result returned. Thank you, I wondered about the integer between 1 and nargs()-1 and the example from the help file for(i in c(-1:3,9)) print(switch(i,

[R] monte carlo simulation in R

2006-12-11 Thread Dedy Angsana
i want to learn about monte carlo simulation in R, also about variance reduction techniques in monte carlo, especialy antithetic variates and control variates. can you give me an example of the code? or where i can find the journal or article or guide? thx for the answers...

[R] upside down image/data

2006-12-11 Thread Jenny Barnes
Dear R-community, I am looking for some simple advice - I have a matrix (therefore 2 dimensional) of global temperature. Having read R-help I think that when I ask R to image() or levelplot() my matrix will it actually appear upside down - I think I therefore need to use the line:

Re: [R] Small Rcmdr issue

2006-12-11 Thread John Fox
Dear Alan, I've noticed that problem too, and have no idea why it happens. The function that's executed when you select Exit - From Commander and R is pretty simple: closeCommanderAndR - function(){ response - closeCommander() if (response == cancel) return() cat(\n)

Re: [R] Small Rcmdr issue

2006-12-11 Thread Peter Dalgaard
John Fox wrote: Dear Alan, I've noticed that problem too, and have no idea why it happens. The function that's executed when you select Exit - From Commander and R is pretty simple: closeCommanderAndR - function(){ response - closeCommander() if (response == cancel) return()

[R] organizing stats from a list of models

2006-12-11 Thread Milton Cezar Ribeiro
Hi there, I have a list of models (about 600 glm models) and I included the prefix mod_ on their name. Now I would like retrieve the list from the R environment and save their AICs (and other info) on a table. I´m trying something like: -

[R] Getting DataFrame Name from Text String

2006-12-11 Thread Bert Jacobs
Hi, I have the following simple function Testfunc = function(x) { Test = subset(x, var1 = 1000) } Suppose I have a dataframe «dat1» then the command Testfunc(dat1) gives a correct result. The problem is that the name of dataframe to be used in the function can be found in a vector (Dfname).

Re: [R] two ggplot and colour=x question

2006-12-11 Thread hadley wickham
I am using ggplot with the aesthetic=list(..., colour=x, ...) ggplot() ggline() I have four different values in x (ren, cyn, mixed, bare) and I have two questions 1) I would like to assign specific colours to the values, i.e. green, red, blue and brown. How can I do this? I did not

Re: [R] filled.contour and NA's

2006-12-11 Thread hadley wickham
I'm trying to do a filled.contour plot where some points are labelled as NA. How do I could plot this kind of graphics, so NA points are coloured black, keeping the levels of remaining points. NA's values represent land points (meaningless), and what I want to plot is the levels of a

Re: [R] two ggplot and colour=x question

2006-12-11 Thread Rainer M Krug
Thanks a lot for your help - I'll try it out and let you know if I still have problems. Rainer hadley wickham wrote: I am using ggplot with the aesthetic=list(..., colour=x, ...) ggplot() ggline() I have four different values in x (ren, cyn, mixed, bare) and I have two questions 1) I

Re: [R] organizing stats from a list of models

2006-12-11 Thread hadley wickham
I have a list of models (about 600 glm models) and I included the prefix mod_ on their name. Now I would like retrieve the list from the R environment and save their AICs (and other info) on a table. I´m trying something like: I have some (rather un)tested code: findmodels -

Re: [R] Weighted averaging partial least squares regression

2006-12-11 Thread ucfagls
Quoting Andreas Plank [EMAIL PROTECTED]: Hello, is it possible in R to calculate a Weighted averaging partial least squares regression? I'm not firm in statistics and didn't found anything about weighted averaging in combination with PLS in the help archives. Or is it possible to develop a

Re: [R] Getting DataFrame Name from Text String

2006-12-11 Thread Vladimir Eremeev
consider get or as.name __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] DOE teaching suggestions?

2006-12-11 Thread Spencer Graves
Hi, Erin: Also, have you seen the BHH2 package, companion to Box, Hunter and Hunter (2005) Statistics for Experimenters, 2nd ed. (Wiley)? Hope this helps. Spencer Graves Are you planning to have them design and conduct an actual

[R] double boostrap with clusterApplyLB

2006-12-11 Thread Michela Cameletti
Dear R-Users, we are using a linux-cluster with RMPI and the snow package. We would like to do a double boostrap. We have a general function that implements the first boostrap (the outer) and we are wondering if we can include another bootstrap (the inner) in the same general function including

[R] How to write a two-way interaction as a random effect in a lmer model?

2006-12-11 Thread Fucikova, Eva
Dear All, I am working with linear mixed-effects models using the lme4 package in R. I created a model with the lmer function including some main effects, a two-way interaction and a random effect. Now I am searching how I could incorporate an interaction between the random effect and one of

[R] Difference in outputs of random mixed effect models (lmer function)

2006-12-11 Thread Syed M. Jamal
Dear all, I am using lme4 library (lmer function) for random mixed effect model. I came across different outputs using R versions 2.2.1 and 2.4.0. I am not sure whether it is due to new version of R or that of lme4 library. I am looking forward to know which version of R and

[R] similarity test with R

2006-12-11 Thread Ethan Johnsons
x=c(3.05176E-05,0.000457764,0.003204346,0.0138855,0.04165649,0.09164429,0.1527405,0.1963806,0.1963806,0.1527405,0.09164429,0.04165649,0.0138855,0.003204346,0.000457764,3.05176E-05)

Re: [R] similarity test with R

2006-12-11 Thread Chuck Cleland
Ethan Johnsons wrote: x=c(3.05176E-05,0.000457764,0.003204346,0.0138855,0.04165649,0.09164429,0.1527405,0.1963806,0.1963806,0.1527405,0.09164429,0.04165649,0.0138855,0.003204346,0.000457764,3.05176E-05)

Re: [R] Getting DataFrame Name from Text String

2006-12-11 Thread Carlos Ortega
Hello, I think assign() makes a better job Regards, Carlos. On 12/11/06, Vladimir Eremeev [EMAIL PROTECTED] wrote: consider get or as.name __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] lmer message

2006-12-11 Thread Marc Bernard
Dear All, I am using lmer to fit a glmm model using the PQL approximation. My data is not a Bernoulli (0/1) but a binomial one. The first thing I noticed is that the method gives me the approximated covariance matrix for the random effects but nothing about the residuals. In addition, I

Re: [R] DOE teaching suggestions?

2006-12-11 Thread Spencer Graves
Hi, Erin: Also, have you seen the BsMD package (Bayes Screening and Model Discrimination), also discussed in Box Hunger and Hunter (2005). Spencer Graves ## Also, have you seen the BHH2 package, companion to Box, Hunter and Hunter (2005) Statistics

[R] Solution of Rcmdr Problem in Quantian OS, Thanks...

2006-12-11 Thread İbrahim Mutlay
As you know, i have problem about Rcmdr in the 2.4.0 version of R, it can't be run properly in Quantian due to that Tcl/Tk does not support it. But, now, with helps from Dirk Eddelbuettel, problem was solved. The solution is just that reinstallation of R from debian packages not by compiling of

Re: [R] R and LaTeX

2006-12-11 Thread Mike Prager
David Kaplan [EMAIL PROTECTED] wrote: Hi all, I have started using LaTeX for writing papers and I have heard that R works well with LaTeX. I'm specifically interested in how I can have LaTeX read in R generated graphics - for example graphs formed by matplot, or other such processes.

Re: [R] set up directory for R when I start R

2006-12-11 Thread Earl F. Glynn
Dieter Menne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Aimin Yan aiminy at iastate.edu writes: I want to set default directory for R when I start R. How to do this? ?setwd In Windows, I prefer the method described in http://tolstoy.newcastle.edu.au/R/help/00b/2454.html

[R] Cannot scale my map

2006-12-11 Thread Mihalis Tsoukalos
Dear list, I have the following problem: I want to plot my data and display a map at the same graph. The problem is that my map is not properly sized (is very small). It appears at the bottom-left side of the output. I am using the following R commands: { plot(Time, col=lightgrey)

[R] behavior of ewma function

2006-12-11 Thread Leeds, Mark \(IED\)
I have the ewma function as shown below. I think I copied it from an oldSplus help page on filter and then modified it with a lot of help from Achim. ewma-function(x,lambda = 1, init = x[1]) { rval-filter(lambda*coredata(x),filter=(1-lambda),method=recursive,ini t=init)

Re: [R] behavior of ewma function

2006-12-11 Thread Leeds, Mark \(IED\)
I just had an idea but I'm not sure how to do it. Create a non NA series ( which I can do ) and smooth that series ( whh I can do ). Then, after that smoothed series is created, put the NAs back into the smoothed series in their appropriate places ( which I don't know how to do ). If anyone does

Re: [R] Multiple Imputation / Non Parametric Models / Combining Results

2006-12-11 Thread Michael Dewey
At 08:12 08/12/2006, Simon P. Kempf wrote: Dear R-Users, The following question is more of general nature than a merely technical one. Nevertheless I hope someone get me some answers. I am in no sense an expert in this area but since it seems that noone else has answered so far; I wonder

Re: [R] Cannot scale my map

2006-12-11 Thread Ray Brownrigg
On Tuesday 12 December 2006 09:07, Mihalis Tsoukalos wrote: Dear list, I have the following problem: I want to plot my data and display a map at the same graph. The problem is that my map is not properly sized (is very small). It appears at the bottom-left side of the output. I am using

Re: [R] Cannot scale my map

2006-12-11 Thread Mihalis Tsoukalos
On Mon 11 Dec 2006, at 22:32 , Ray Brownrigg wrote: On Tuesday 12 December 2006 09:07, Mihalis Tsoukalos wrote: Dear list, I have the following problem: I want to plot my data and display a map at the same graph. The problem is that my map is not properly sized (is very small). It appears

Re: [R] set up directory for R when I start R

2006-12-11 Thread Duncan Murdoch
On 12/11/2006 2:21 PM, Earl F. Glynn wrote: Dieter Menne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Aimin Yan aiminy at iastate.edu writes: I want to set default directory for R when I start R. How to do this? ?setwd In Windows, I prefer the method described in

[R] I think this modified ewma function works if anyone is interested

2006-12-11 Thread Leeds, Mark \(IED\)
I think this modified version of ewma works for anyone who is interested. It gets rid of any NAs, smoothes the resulting series and then puts the NAs back in at their correct spots. The only catch is that the input has to be a zoo object. Sometimes I shock myself. ewmab-function(x,lambda = 1,

Re: [R] global option settings for grid and lattice?

2006-12-11 Thread Paul Murrell
Hi Zepu Zhang wrote: Hello, I'd like to be able to set options for grid and lattice globally, once for all subsequent plots, just like what ps.options() does. I walked through the functions of Grid and didn't find it. The following are related things that are available: get.gpar()

[R] hermite and Bezier splines

2006-12-11 Thread Mark Hindell
Does anyone know how to do hermite or Bezier splines in R? I can find Matlab routines, but really need to implement them in R. Failing that I'd be interested in other conformal splines. I need to smooth and interpolate animal tracking data. Antarctic Wildlife Research Unit School of

[R] Problem with sas.get function in Hmisc

2006-12-11 Thread Jean Vidal
Thomas, As F Harrel in a preceding message told me that you are the maintainer of Hmisc package, I write directly to you, with copy to the Rhelp list in case someone encountered the same problem and find some benefit in the response. I used quite often the function sas.get in Hmisc library which

[R] EBimage package for materials science

2006-12-11 Thread İbrahim Mutlay
Dear R users, In last R News, a new package was appeared. EBimage image processing package seems so powerful. But in R News, it is used for the images of cells under microscope. So, i wonder whether there is anyone who use this package for materials science applications such as determination of

[R] a web interface to identify()

2006-12-11 Thread Jon Stearley
i have a function like this: # show a plot and run a script when the user clicks on a plot, # where the script arguments correspond to the user-selected point. blah - function(x, y) { plot(y~x) n - identify(x=x, y=y) com - system(command=paste(bleh, names(y)[n])) } i would

[R] implementation of t.test

2006-12-11 Thread Weiwei Shi
Hi, there: for some reason, I need to look at t.test at coding level. Can anyone here suggest a place to start with? thanks. -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. Did you always know? No, I did not. But I believed... ---Matrix III __

[R] strings as factors

2006-12-11 Thread Alexander Nervedi
Hi, To be able to match cases with a benchmark I need to have a data.frame with a character id variable. however, I am surprised why this seems to be so hard. In fact I was unable to succeed. Here is what I tried: test1 -expand.grid(ID = 1:2, sex = c(male,female)) is(test1[,2]) [1] factor

[R] Combining bitmaps and plots - file too large

2006-12-11 Thread Jared.O'Connell
Hello, I wish to draw a bitmap image and a standard plot in a split window, multiple times, output to a pdf eg. library(pixmap) pdf(test.pdf) for(i in 1:50) { par(mfrow=c(1,2)) p1 = read.pnm(paste(img,i,.ppm,sep=)) plot(x,y) } dev.off() The end result is a pdf file 1GB,

[R] Hourly Time Series

2006-12-11 Thread Harshal D Dedhia
I have hourly data for approximately 21 days in the following format DateIDHourIDMetrics 200609200xx 200609201xx The hour ids correspond to one hour windows starting 00:00 to 23:59. I have never dealt with TS data before. What

Re: [R] implementation of t.test

2006-12-11 Thread Charles C. Berry
On Mon, 11 Dec 2006, Weiwei Shi wrote: Hi, there: for some reason, I need to look at t.test at coding level. Can anyone here suggest a place to start with? You mean how to read the code?? Like this: t.test # print the function function (x, ...) UseMethod(t.test) environment:

Re: [R] strings as factors

2006-12-11 Thread Bill.Venables
Here is a possibility: test - expand.grid(id = 1:2, sex = c('male', 'female')) sapply(test, class) id sex integer factor test - transform(test, sex = as.character(sex)) sapply(test, class) id sex integer character But I am surprised at the reason you

[R] help on determining operating system

2006-12-11 Thread LU YING
Dear list, I am an R user and I also write my own package in R(sometime i need to write in C), and right now i am thinking about buying a new workstation--and i am trying to decide if i should get a mac with OS X or a linux machine (for example Dell). I have experience using R on linux (but

[R] how to define w matrix in my case?

2006-12-11 Thread Xu Yuan
hello list, I have N agricultural fields (some of them share borders, some don't) with ph as the variable of interest. Since I want to test the spatial autocorrelation, I need to come up with the w matrix. The first and easy way that came to my brain was the binary relationship, i.e., the w

Re: [R] help on determining operating system

2006-12-11 Thread Mihalis Tsoukalos
On Tue 12 Dec 2006, at 06:40 , LU YING wrote: Dear list, I am an R user and I also write my own package in R(sometime i need to write in C), and right now i am thinking about buying a new workstation--and i am trying to decide if i should get a mac with OS X or a linux machine (for example

[R] multiple x-axis labels on plot

2006-12-11 Thread t.d. kaplan
hi, how can i set multiple x-axis labels on a plot? in effect, i want to set 2 x-axis labels and values on the tick marks. is it possible to have one running on the bottom (as is the default) and another running across the top of a plot? like: xlab-1 - | | | | -

[R] surface plot

2006-12-11 Thread Divya Alice Varkey
Hi, I have been trying to make a surface plot using R - I came across functions like plot.surface, surface but I could not use these functions as they seem to be in FOO package which I cannot load. I also want to make a plane that fits the surface plot. Can anyone help? divya