Re: [R] F values from a Repeated Measures aov

2008-04-29 Thread Peter Dalgaard
Alex Baugh wrote: Hi Folks, I have repeated measures for data on association time (under 2 acoustic condtions) in male and female frogs as they grow to adulthood (6 timepoints). Thus, two within-subject variables (Acoustic Condition: 2 levels, Timepoint: 6 levels) and one between-subject

Re: [R] R help

2008-04-29 Thread Erich Neuwirth
Does your res.dat only have one row and you want this to one variable? For read.table each new case has to start on a new line. If your data are in a just one row for a variable format, res - scan(C:/Documents and Settings/db/Desktop/res.dat) will probably do what you want. Debasish Roy wrote:

[R] Simulation study in R

2008-04-29 Thread Arun Kumar Saha
Here I am in a simulation study where I want to find different values of x and y such that f(x,y)=c (some known constant) w.r.t. x, y 0, y=x and x=c1 (another known constant). Can anyone please tell me how to do it efficiently in R. One way I thought that I will draw different random numbers from

[R] nls plinear formula

2008-04-29 Thread gutierrez.m05
I want to fit a nonlinear model of the form: Y=A+B*X1+C*X2+log(X3/(X3+D)) I think that the best way is to use the plinear algorithm, but I don't know how to specify the formula in the nls function. I've tried: Y~cbind(rep(1,times=length(Y)),X1,X2,log(X3/(X3+D))) But this fits the model:

Re: [R] Simulation study in R

2008-04-29 Thread Moshe Olshansky
Are the pairs (x,y) belong to some lattice or can change continuously? Does f assume some discrete values (or is constant on sets of positive measure)? If not then it will be hard to randomly select x and y which satisfy the exact equality (this still can happen since there are finitely many

Re: [R] Simulation study in R

2008-04-29 Thread Arun Kumar Saha
x, y are cont. variable, and f also have to be cont.. And your second suggestion is correct of course, it actually should be |f(x,y) - c| epsilon Thanks On Tue, Apr 29, 2008 at 12:34 PM, Moshe Olshansky [EMAIL PROTECTED] wrote: Are the pairs (x,y) belong to some lattice or can change

[R] generic question - Genomics with R

2008-04-29 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi everybody, I am trying to make my mind about the use of R for Computational and Statistical Approaches to Genomics. I know this is a vaste field: this is the main reason why I am sending this message to this always useful list! Any key/entry point to this field will be extremely welcome!

Re: [R] resolution (dpi) problem

2008-04-29 Thread Chris Walker
To all those who helped with this problem (Ted, Jon, Marc and Prof. Ripley). When I submitted the postscript files to the journal, I had given them the extension .ps even though they were (of course) encapsulated postscript. I decided to simply rename the files with the .eps extension and

Re: [R] Set of well distinguishable line types?

2008-04-29 Thread Werner Wernersen
That's a nice set of line types! I'll use these now. I thought because there are so many sophisticated color schemes there might be some line style schemes as well. Thanks for your help Jim and Richard, Werner --- Richard Pearson [EMAIL PROTECTED] schrieb: I've used the following to get a

Re: [R] generic question - Genomics with R

2008-04-29 Thread Liviu Andronic
Hello, On 4/29/08, [Ricardo Rodriguez] Your XEN ICT Team [EMAIL PROTECTED] wrote: I am trying to make my mind about the use of R for Computational and Statistical Approaches to Genomics. [..] Please, could you help me to go in the right direction? I am not sure what pointers you are

Re: [R] empirical null distribution

2008-04-29 Thread mad_bassie
It's not really homework :) It's just an a little extra I want to explore. I allready compared the empirical null distribution and the theoritical null distribution by comparing their quantiles. The results are clear... But I just wondered if there isn't any way to make a graph of it...so you

[R] Variogram problem

2008-04-29 Thread Fritier Nicolas
Hello, I'm french and I have some difficulties in carry out the semiones under R with an aim to carry out an interpolation by krigeage. My goal is to obtain a chart of the distribution of precipitations/temperatures in Europe starting from 73 different stations (and, of course, distributed

[R] generic question == mapping Longhurst biogeochemical ocean provinces in R

2008-04-29 Thread Maria Jose Juan Jorda
Hello all I am a newbie to R plotting maps. I am trying to plot over a world map a layer of Biogeochemical provinces (BGCP) by A.R. Longhurst. Each ocean region unfortunately are quite irregular in shape (not perfect squares). In GIS this layer of ocean provinces would be a layer of polygons,

[R] Using machine learning model to work on new data

2008-04-29 Thread jrwang
---BeginMessage--- ---End Message--- 本信件可能包含工研院機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain confidential information. Please ...{{dropped:5}} __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] how to find the minimum

2008-04-29 Thread Richard . Cotton
I am a new R user, and not very good at statistics and maths I find it difficult to find the minimum of this item: ((p*(b-1)-1)*(p+1)^(b-1)+1)/p^2 It seems that the method optim can find the minimum. I tried several times , but R constanly tells that failure to find b or

Re: [R] Variogram problem

2008-04-29 Thread ONKELINX, Thierry
Nicolas, I think you better have a look at the gstat package. install.packages(gstat) library(gstat) example(gstat) ?variogram ?krige HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek /

Re: [R] R on X11 under Linux (newbie)

2008-04-29 Thread Ronaldo Reis Junior
Em Seg 28 Abr 2008, Dumblauskas, Jerry escreveu: Thx I verified by typing in plot(1,1) at the R prompt -- sure enough an X window popped up on my desktop. Off to investigate Linux GUI front ends! Thx again Hi, at this moment the best IDE to use R on Linux in my opinion are in sequence:

Re: [R] generic question - Genomics with R

2008-04-29 Thread Richard Pearson
I'd also suggest you check out http://www.bioconductor.org - Bioconductor is an open source and open development software project for the analysis and comprehension of genomic data Richard. Liviu Andronic wrote: Hello, On 4/29/08, [Ricardo Rodriguez] Your XEN ICT Team [EMAIL PROTECTED]

Re: [R] generic question - Genomics with R

2008-04-29 Thread bartjoosen
I'm not sure what you are trying to do with R, but maybe you should take a look at the Task Views and see if there is something you can use at your field of work: http://www.stats.bris.ac.uk/R/web/views/ Bart Ricardo Rodríguez wrote: Hi everybody, I am trying to make my mind about the

[R] generic question == mapping Longhurst biogeochemical ocean provinces in R

2008-04-29 Thread Maria Jose Juan Jorda
*Hello all ** I am a newbie to R plotting maps. I am trying to plot over a world map a layer of Biogeochemical provinces (BGCP) by A.R. Longhurst. Each ocean region unfortunately are quite irregular in shape (not perfect squares). In GIS this layer of ocean provinces would be a layer of polygons,

Re: [R] Help with installing R on Red Hat linux 4

2008-04-29 Thread Patrick Connolly
On Sun, 27-Apr-2008 at 10:52AM -0700, [EMAIL PROTECTED] wrote: | I am trying to install the rpm for R | I using Red Hat 4 ES on a 64bit machine | Kernel version is 2,6,9-67 | This is the error i get | Failed Dependencies libg2c.so () ()(64bit) is needed by | R-2.6.2-1.rh4.x86_64rpm | I have

[R] How to plot wind direction and strength field

2008-04-29 Thread Jenny Barnes
Dear R-help community, I have searched through the archives and not been able ot find any advice on how to plot a wind field with one arrow per grid square with the arrow pointing in the direction of the wind and it's size proportional to the wind strength. I have the wind speed data in

Re: [R] generic question == mapping Longhurst biogeochemical ocean provinces in R

2008-04-29 Thread Roger Bivand
Maria Jose Juan Jorda mjuanjorda at gmail.com writes: Hello all I am a newbie to R plotting maps. I am trying to plot over a world map a layer of Biogeochemical provinces (BGCP) by A.R. Longhurst. Each ocean region unfortunately are quite irregular in shape (not perfect squares). In GIS

Re: [R] generic question - Genomics with R

2008-04-29 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thank you so much. All the answers lead me to BioConductor and Task Views. Currently, I've not a precise task to solve, but I do need to draw a landscape about this topic. Your messages have helped a lot. I don't know why, but I don't reach BioConductor website by googling or searchmashing.

Re: [R] R help

2008-04-29 Thread Duncan Murdoch
On 28/04/2008 9:47 PM, Debasish Roy wrote: I tried to read a dataset and then draw a histogram with a freqeuncy density curve fitted on the top of this. I used the command res - read.table(C:/Documents and Settings/db/Desktop/res.dat) and found res[1:5] V1 V2 V3 V4

Re: [R] empirical null distribution

2008-04-29 Thread Duncan Murdoch
On 29/04/2008 4:13 AM, mad_bassie wrote: It's not really homework :) It's just an a little extra I want to explore. I allready compared the empirical null distribution and the theoritical null distribution by comparing their quantiles. The results are clear... But I just wondered if there isn't

Re: [R] SOLVED error in summary.Design

2008-04-29 Thread DAVID ARTETA GARCIA
Dear Frank and rest of list, please accept my apologies for not giving full details of my analysis in my previous email. I have been working on this problem and I think my error comes from the class of my variables and the way I defined the model, and I seemed to be able to solve it...

Re: [R] How to plot wind direction and strength field

2008-04-29 Thread Jim Lemon
Jenny Barnes wrote: Dear R-help community, I have searched through the archives and not been able ot find any advice on how to plot a wind field with one arrow per grid square with the arrow pointing in the direction of the wind and it's size proportional to the wind strength. I have the

[R] I can not open R (UNCLASSIFIED)

2008-04-29 Thread Park, Kyong H Mr ECBC
Classification: UNCLASSIFIED Caveats: NONE Dear R users, I could not open R2.4.1 this morning with error messages Error in loadName space (name): There is no package called 'nlme' and Fatal error: unable to restore saved data in .Rdata under the information box. It had been working fine until

Re: [R] How to plot wind direction and strength field

2008-04-29 Thread Jenny Barnes
Hi Jim, I would like to plot something like figure 2 on this webpage: http://www.cnrfc.noaa.gov/storm_summaries/jan1997storms.php My data is very large - covering the whole globe at 2.5deg resolution so longitude=144 girds, latitude=73 grids and time=32 years - hard to give you that

Re: [R] How to plot wind direction and strength field

2008-04-29 Thread seanpor
Jenny, Have a look at the R Newsletter Volume 3/2, October 2003 Regards, Sean Jenny Barnes wrote: Dear R-help community, I have searched through the archives and not been able ot find any advice on how to plot a wind field with one arrow per grid square with the arrow pointing in

Re: [R] Variogram problem

2008-04-29 Thread Fritier Nicolas
Thanks for your help, It is definitely that it is needed to me in finale, I therefore did not use the package check. I am going to try to understand step how is that now. Still thanks for your help! -- View this message in context:

[R] Legend problem when exporting a plot to PDF

2008-04-29 Thread Julien Roux
Hi list, When exporting to PDF a graph with a legend, in the final PDF, the text is going beyond the legend box. dev2bitmap(test.pdf, type=pdfwrite, h=6, w=6) The legend looks OK on the screen. I noticed that the size of the legend box depends on the size of the screen window, which is not

[R] Running regression (lm, lrm) 100+ times and saving the results as matrix

2008-04-29 Thread Mike H. Ryu
An undergraduate here, so do not hesitate to let me know if you feel that I'm heading in a wrong direction. I have a data frame containing panel data across 10 years (hence 120 months). I want to be able to run regression separately for each month (or year). The below shows how I ran the

[R] (no subject)

2008-04-29 Thread hela mzoughi
Bonjour, Je travail sur R pour la modélisation des copules et j'ai utilisé le package fCopulae. Le problème est que j'ai pas les noms des copules utilisées:j'ai utilisé la list de 1 jusqu'au 22 et j'ai réussi à avoir les paramètres. S'il vous plaît, je demande votre aide là dessus. Dans

Re: [R] Legend problem when exporting a plot to PDF

2008-04-29 Thread Philipp Pagel
When exporting to PDF a graph with a legend, in the final PDF, the text is going beyond the legend box. dev2bitmap(test.pdf, type=pdfwrite, h=6, w=6) The legend looks OK on the screen. I noticed that the size of the legend box depends on the size of the screen window, As far as I

Re: [R] resolution (dpi) problem

2008-04-29 Thread Marc Schwartz
Chris Walker wrote: To all those who helped with this problem (Ted, Jon, Marc and Prof. Ripley). When I submitted the postscript files to the journal, I had given them the extension .ps even though they were (of course) encapsulated postscript. I decided to simply rename the files with the .eps

Re: [R] empirical null distribution

2008-04-29 Thread mad_bassie
I'm using F-distributions :) I allready found some things...I could plot the qqplot as you say and that gives me clear results. Allthough I still want a clear graphic and I 'll explain it as good as I can... I plotted 2 graphics plot(density(rf(1,2,49))) plot(density(disttest))

Re: [R] Legend problem when exporting a plot to PDF

2008-04-29 Thread Prof Brian Ripley
Copying between devices (as in dev2bitmap) is not a good way to produce high-quality graphs, and especially not if you change the size. What is wrong with pdf(test.pdf, width=6, height=6) re-run the plot commands dev.off() ? On Tue, 29 Apr 2008, Julien Roux wrote: Hi list, When

Re: [R] How to plot wind direction and strength field

2008-04-29 Thread Gabor Grothendieck
Check out: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=80 and RSiteSearch(quiver) On Tue, Apr 29, 2008 at 6:08 AM, Jenny Barnes [EMAIL PROTECTED] wrote: Dear R-help community, I have searched through the archives and not been able ot find any advice on how to plot a wind

[R] randomForest and ordered factors

2008-04-29 Thread Birgit Lemcke
Hello R-user! I am running R 2.7.0 on a Power Book (Tiger). (I am still R and statistics beginner) I try to find the most important variables to divide my dataset as given in a categorical variable. code: Test.rf4-randomForest(Sex~.,na.action=na.roughfix, data=Subset4,

[R] data management (subsetting and recombining)

2008-04-29 Thread stephen sefick
This is an example of two months of data from a twenty four month data set that I would like to apply this too. These data are subsets of the same stations throught time, but differing ones were included on different sampling dates. I would like to subset these data and then put them together as

[R] NumDeriv - derivatives of covariance matrix

2008-04-29 Thread Daomeng Gao
Hello R-help, I need to compute matrices of first derivatives of a covariance matrix C with entries given by c_ij=theta*exp(-0.5* sum(eta*(x[i,]-x[j,])^2)), wrt to elements of eta, a m-dimensional vector of parameters, given a n*m data matrix x. So far, I have been computing matrices for each

Re: [R] empirical null distribution

2008-04-29 Thread Duncan Murdoch
On 29/04/2008 8:09 AM, mad_bassie wrote: I'm using F-distributions :) I allready found some things...I could plot the qqplot as you say and that gives me clear results. Allthough I still want a clear graphic and I 'll explain it as good as I can... I plotted 2 graphics

Re: [R] How to plot wind direction and strength field

2008-04-29 Thread Jenny Barnes
Thanks Jim - here is some data: u - array(NA,c(5,8)) t - seq(from=0.5, to=0.11,length=15) t2 - seq(from=(-0.7),to=(-0.1),length=25) u[1:15] - t u[16:40] - t2 v - array(NA,c(5,8)) y - seq(from=(-0.9), to=(-0.01),length=40) v[1:40] - y I've made up the data but it's similar magnitude and the

Re: [R] How to plot wind direction and strength field

2008-04-29 Thread Jenny Barnes
Hi Jim, I forgot to say that I don't want to create curved arrows, just straight - and I would like them to be proportional to the magnitude :o) Thanks again for your time! Jenny On Tue, 29 Apr 2008, Jenny Barnes wrote: Hi Jim, I would like to plot something like figure 2 on this

[R] How do you test for consecutivity?

2008-04-29 Thread Anthony28
I need to use R to model a large number of experiments (say, 1000). Each experiment involves the random selection of 5 numbers (without replacement) from a pool of numbers ranging between 1 and 30. What I need to know is what *proportion* of those experiments contains two or more numbers that

Re: [R] prediction in coxph

2008-04-29 Thread Terry Therneau
I have tried predict(coxout, newdata), it still gave me the fitted values only. Can anyone hlep me on how to do prediction for coxph? thank you very much! I would suggest first reading the manual page help(predict.coxph) There are several things one can predict from a Cox model. You

Re: [R] resolution (dpi) problem

2008-04-29 Thread Ted Harding
On 29-Apr-08 12:09:39, Marc Schwartz wrote: Chris Walker wrote: To all those who helped with this problem (Ted, Jon, Marc and Prof. Ripley). When I submitted the postscript files to the journal, I had given them the extension .ps even though they were (of course) encapsulated postscript. I

Re: [R] How do you test for consecutivity?

2008-04-29 Thread Marc Schwartz
Anthony28 wrote: I need to use R to model a large number of experiments (say, 1000). Each experiment involves the random selection of 5 numbers (without replacement) from a pool of numbers ranging between 1 and 30. What I need to know is what *proportion* of those experiments contains two or

Re: [R] Simulation study in R

2008-04-29 Thread Robert A LaBudde
At 02:40 AM 4/29/2008, Arun Kumar Saha wrote: Here I am in a simulation study where I want to find different values of x and y such that f(x,y)=c (some known constant) w.r.t. x, y 0, y=x and x=c1 (another known constant). Can anyone please tell me how to do it efficiently in R. One way I thought

Re: [R] Legend problem when exporting a plot to PDF

2008-04-29 Thread Joerg van den Hoff
On Tue, Apr 29, 2008 at 01:49:01PM +0200, Philipp Pagel wrote: When exporting to PDF a graph with a legend, in the final PDF, the text is going beyond the legend box. dev2bitmap(test.pdf, type=pdfwrite, h=6, w=6) The legend looks OK on the screen. I noticed that the size of the

Re: [R] How do you test for consecutivity?

2008-04-29 Thread Doran, Harold
How about this result - numeric(10) for(i in 1:10){ x - sample(1:30, 5, replace = FALSE) x - sort(x) result[i] - any(diff(x) == 1) } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anthony28 Sent: Tuesday, April 29, 2008 8:52 AM To:

[R] function to generate weights for lm?

2008-04-29 Thread tom soyer
Hi, I would like to use a weighted lm model to reduce heteroscendasticity. I am wondering if the only way to generate the weights in R is through the laborious process of trial and error by hand. Does anyone know if R has a function that would automatically generate the weights need for lm?

[R] How do I specify a model with nested random terms?

2008-04-29 Thread Ingrid . Mage
Dear R-users, I have problems specifying a model with nested random terms. I want to reproduce a variance component model made in Mintab, the model specification in Minitab is: Response = Prod P Prod*P Sample(Prod P) Extract(Prod P Sample) Random Prod Sample Extract The dataset is

Re: [R] vioplot kernel smooth via density kernel smooth

2008-04-29 Thread Johannes Graumann
posted mailed Johannes Graumann wrote: Vioplots have great appeal to me, as they manage to squeeze so much information into so little space ... Now some evaluation has made me suspicious about the implementation in the package vioplot and I would like to hear what you say about the appended

[R] XML write?

2008-04-29 Thread Alberto Monteiro
Is there any function to write a XML structure, after it was read using xmlTreeParse? Ex: library(XML) x - xmlTreeParse(Irpf2008/aplicacao/dados/12345678901/12345678901.xml) # write it... Alberto Monteiro PS: please, brazilians, don't be offended by my foul language!

[R] Get inside a function the name of a variable called as argument?

2008-04-29 Thread Julien Roux
Hi list, I created a function to plot my data: plot_function(vector) I want to write the name of the argument vector in the legend/title of the plot. For example if I call: plot_function(my_vector) I want my_vector to be written in the legend or title and so retrieve the name of this object

Re: [R] ggplot2: setting global graphic parameters with png driver

2008-04-29 Thread Prof Brian Ripley
You forgot to mention your version of R and your platform (and R has at least 3 separate png() devices). In 2.7.0, specify the size in inches and increase the resolution. In earlier versions, try bitmap(). From NEWS for 2.7.0 o Considerable efforts have been made to make the default

Re: [R] XML write?

2008-04-29 Thread Gabor Grothendieck
By write, do you mean print? In that case using the basic.xml file that comes with the XML package: library(XML) basic.xml - system.file(exampleData, basic.xml, package = XML) # try this con - xmlTreeParse(basic.xml) root - xmlRoot(con) root # or if you are using internal nodes: con -

Re: [R] XML write?

2008-04-29 Thread Jeffrey Horner
Alberto Monteiro wrote on 04/29/2008 08:37 AM: Is there any function to write a XML structure, after it was read using xmlTreeParse? Ex: library(XML) x - xmlTreeParse(Irpf2008/aplicacao/dados/12345678901/12345678901.xml) # write it... Calling: library(help=XML) # or help(package=XML)

Re: [R] data management (subsetting and recombining)

2008-04-29 Thread stephen sefick
s.d - structure(list(RiverMile = c(202L, 198L, 190L, 185L, 179L, 148L, 119L, 61L)), .Names = RiverMile, row.names = c(NA, -8L), class = data.frame) #s.d is all of the river miles that can occur in all of the data frames that I want to put together feb06 - structure(list(RiverMile = c(202L, 190L,

Re: [R] XML write?

2008-04-29 Thread Alberto Monteiro
Gabor Grothendieck wrote: By write, do you mean print? No, I mean save to a file. I solved the problem with this: library(XML) x - xmlTreeParse(Irpf2008/aplicacao/dados/12345678901/12345678901.xml) sink(ihatetheirs.xls) print(x) sink() and then I can edit the saved file to cut some extra

Re: [R] XML write?

2008-04-29 Thread Gabor Grothendieck
On Tue, Apr 29, 2008 at 10:20 AM, Alberto Monteiro [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: By write, do you mean print? No, I mean save to a file. I solved the problem with this: library(XML) x - xmlTreeParse(Irpf2008/aplicacao/dados/12345678901/12345678901.xml)

Re: [R] randomForest and ordered factors

2008-04-29 Thread Liaw, Andy
If you are using the latest version (4.5-25), you will see in rfNews() that that's the problem I need to fix. The package was able to handle ordered factors, but some more stringent checks for factor levels consistency introduced in 4.5-23 broke the support for ordered factors in prediction.

Re: [R] Get inside a function the name of a variable called as argument?

2008-04-29 Thread Duncan Murdoch
On 29/04/2008 9:53 AM, Julien Roux wrote: Hi list, I created a function to plot my data: plot_function(vector) I want to write the name of the argument vector in the legend/title of the plot. For example if I call: plot_function(my_vector) I want my_vector to be written in the legend or

[R] merging multiple data frames with different numbers of rows

2008-04-29 Thread stephen sefick
merge can only merge two objects at a time- I would like to merge more than two objects at a time. s.d - structure(list(RiverMile = c(202L, 198L, 190L, 185L, 179L, 148L, 119L, 61L)), .Names = RiverMile, row.names = c(NA, -8L), class = data.frame) #s.d is all of the river miles that can occur in

Re: [R] randomForest and ordered factors

2008-04-29 Thread Birgit Lemcke
Hello Andy, thanks for your answer and sorry that I did not check the rfNews. You are right, presently I am only looking at variable importance and therefore I am very happy to hear that I won`t have problems using ordered factors. Since I just started to fiddle around with randomForest it

Re: [R] Get inside a function the name of a variable called as argument?

2008-04-29 Thread Hans Ekbrand
On Tue, Apr 29, 2008 at 03:53:02PM +0200, Julien Roux wrote: Hi list, I created a function to plot my data: plot_function(vector) I want to write the name of the argument vector in the legend/title of the plot. For example if I call: plot_function(my_vector) I want my_vector to be

Re: [R] merging multiple data frames with different numbers of rows

2008-04-29 Thread Gabor Grothendieck
It appears that these are time series (i.e. there is only one value of River Mile in any one data frame) so if that's right you would be better off representing them as time series. Using zoo: library(zoo) feb06.z - zoo(feb06[,2], feb06[,1]) may06.z - zoo(may06[,2], may06[,1]) jun06.z -

[R] deleting variables

2008-04-29 Thread Ralf Goertz
How can I automatically exclude one variable from being saved in the workspace when I quit an R session? The problem is I don't know how to erase a variable once it has been created. Background: I open a connection called con to a database server in my ~/.Rprofile. Obviously, the connection

[R] How to hide the warnings

2008-04-29 Thread Vidhu Choudhary
Hi All, I want to hide all the system(R) generated warning messages and want only the messages from my script should be shown when i run myscript.R Can you please suggest how can I hide the warnings Thank you Vidhu [[alternative HTML version deleted]]

Re: [R] deleting variables

2008-04-29 Thread Richard Pearson
?rm Richard Ralf Goertz wrote: How can I automatically exclude one variable from being saved in the workspace when I quit an R session? The problem is I don't know how to erase a variable once it has been created. Background: I open a connection called con to a database server in my

[R] how to solve a power series linear coefficient equation

2008-04-29 Thread e-letter
Readers, I am having difficulty understanding how to enter commands into r. I have data arranged as: 100, 200, 300 5.6, 6.7, 7.8 8.9, 9.0, 0.1 1.2, 2.3, 3.4 The data is saved in csv format and I use the command 'read.table' to import into r. The values 5.6...3.4 are a function of values

[R] Consecutive zeros in a vector

2008-04-29 Thread Kenn Konstabel
Suppose X is a long vector of integers (typically about 3 elements). Is there an efficient way to detect whether there are at least N consecutive zeros in X, and if yes, where does this occur? for example, suppose X is: 1 2 3 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 2 0 1 2 0 0 0 2 2 2 2 2 ...

Re: [R] Consecutive zeros in a vector

2008-04-29 Thread Duncan Murdoch
On 29/04/2008 11:39 AM, Kenn Konstabel wrote: Suppose X is a long vector of integers (typically about 3 elements). Is there an efficient way to detect whether there are at least N consecutive zeros in X, and if yes, where does this occur? for example, suppose X is: ... and N is 10. I

Re: [R] F values from a Repeated Measures aov

2008-04-29 Thread John Vokey
Two things: 1. the + Sex term is superfluous 2. the variable Subject needs to be a Factor, not a vector (as I suspect it currently is). That is, add: mydata.tab$Subject=as.factor(mydata.tab$Subject) in the preamble before the aov call, and all should be fine. On 29-Apr-08, at 4:00 AM,

[R] Concatenate variables and quoted text for output filenames

2008-04-29 Thread trhermes
I am outputting some graphs from SpatStat using a for loop. I want the png files to include the i and j from the nested loops in their names. For example, I want the file names to look like i-j_plot.png. The code is below: ma - levels(marks(X)) n - length(ma) for(i in 1:n) for(j in 1:n)

Re: [R] deleting variables

2008-04-29 Thread Rubén Roa-Ureta
Richard Pearson wrote: ?rm Richard Ralf Goertz wrote: How can I automatically exclude one variable from being saved in the workspace when I quit an R session? The problem is I don't know how to erase a variable once it has been created. [...] Ralf More on the use of rm. If you want

Re: [R] How do you test for consecutivity?

2008-04-29 Thread Charles Annis, P.E.
This will work: my.list - c(2, 28, 31, 4, 27) sort(my.list) diff(sort(my.list)) any(diff(sort(my.list)) == 1) the middle two lines are only to illustrate what's going on. Best wishes! Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265

Re: [R] Concatenate variables and quoted text for output filenames

2008-04-29 Thread Wolfgang Huber
29/04/2008 17:04 trhermes a écrit I am outputting some graphs from SpatStat using a for loop. I want the png files to include the i and j from the nested loops in their names. For example, I want the file names to look like i-j_plot.png. The code is below: ma - levels(marks(X)) n -

Re: [R] How to hide the warnings

2008-04-29 Thread Henrik Bengtsson
See help(warnings) and from there you'll also find help(warning). It is described there. /Henrik On Tue, Apr 29, 2008 at 5:14 PM, Vidhu Choudhary [EMAIL PROTECTED] wrote: Hi All, I want to hide all the system(R) generated warning messages and want only the messages from my script should be

Re: [R] How do you test for consecutivity?

2008-04-29 Thread Julian Burgos
Hey Anthony, There must be many ways to do this. This is one of them: #First, define a function to calculate the proportion of consecutive numbers in a vector. prop.diff=function(x){ d=diff(sort(x)) prop=(sum(d==1)+1)/length(x) return(prop)} #Note that I am counting both numbers in a

[R] Calling R from C - part way there but need a push!

2008-04-29 Thread Maximillian Murphy
Dear All, I've read the manual on Writing R Extensions and in particular the part on calling R from C. (Most of the manual is about calling C from R, not the other way around.) The good news is that I can now call _some_ R from C, specifically the R functions which have C header

Re: [R] Combine Values into a Vector or List

2008-04-29 Thread Diego Culattoni
Hi Richard, Thanks a lot! What I actually want to have A1 4 A2 2 . and so on! Is this possible? Thank you again :)! - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Diego Culattoni [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, April

Re: [R] ggplot2: setting global graphic parameters with png driver

2008-04-29 Thread Xavier Chardon
Sorry I forgot these informations. I'm using R 2.70, under Linux (Debian Etch). The png driver uses cairo, and the version of libcairo installed is 1.2.4 (which is not the latest, but more recent versions are not available is the debian stable repositories) I tried bitmap(), and it does not

Re: [R] How do you test for consecutivity?

2008-04-29 Thread Charles C. Berry
On Tue, 29 Apr 2008, Anthony28 wrote: I need to use R to model a large number of experiments (say, 1000). Each experiment involves the random selection of 5 numbers (without replacement) from a pool of numbers ranging between 1 and 30. What I need to know is what *proportion* of those

Re: [R] How do you test for consecutivity?

2008-04-29 Thread Julian Burgos
Hey Anthony, My previous function may not work in all cases. Say one of the experiments yields these numbers: 1,2,3,6,7 Would you say that the proportion of consecutive numbers is 100%? If so, this will work: prop.diff=function(x){ d=diff(sort(x)) prop=sum((c(0,d==1)+c(d==1,0))0)

Re: [R] function to generate weights for lm?

2008-04-29 Thread Kingsford Jones
On Tue, Apr 29, 2008 at 6:20 AM, tom soyer [EMAIL PROTECTED] wrote: Hi, I would like to use a weighted lm model to reduce heteroscendasticity. I am wondering if the only way to generate the weights in R is through the laborious process of trial and error by hand. Does anyone know if R has

[R] If(cond) statement

2008-04-29 Thread Beck, Kenneth (STP)
Why will this simple statement not work? I think I am following the documentation for if(cond) statements, and I have tried wrapping the cons.expr and alt.expr in {}, I get the same error. There is no example in the help file, and this is not covered in the Introduction to R, SimpleR or other

[R] R code for weighted Deming regression?

2008-04-29 Thread Du, Hongyan
Hi, Any one has the code that I can borrow? Or any suggestions? Highly appreciate. Hongyan Du [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] panel.xyplot()

2008-04-29 Thread Qian R
I am try to create a plot using xyplot(). I created a function panel.fun() wich generate segment, but I need use two columns from dataset2. library(lattice) panel.fun - function(x, y, minx, maxx, miny, maxy) { panel.xyplot(x,y) # since I don't know how to call dataset2 inside

Re: [R] Calling R from C - part way there but need a push!

2008-04-29 Thread Duncan Murdoch
On 29/04/2008 12:19 PM, Maximillian Murphy wrote: Dear All, I've read the manual on Writing R Extensions and in particular the part on calling R from C. (Most of the manual is about calling C from R, not the other way around.) The good news is that I can now call _some_ R from C,

[R] Statistical Methods and Software for the Analysis of Occupational Exposure Data With Non-Detectable Values

2008-04-29 Thread Tom La Bone
FYI This is a nice package that is not on CRAN for some reason. You can get it at http://www.csm.ornl.gov/esh/statoed/ Tom -- View this message in context:

Re: [R] If(cond) statement

2008-04-29 Thread Chuck Cleland
On 4/29/2008 1:21 PM, Beck, Kenneth (STP) wrote: Why will this simple statement not work? I think I am following the documentation for if(cond) statements, and I have tried wrapping the cons.expr and alt.expr in {}, I get the same error. There is no example in the help file, and this is not

Re: [R] If(cond) statement

2008-04-29 Thread Erik Iverson
Kenneth - See ?if in the Details section. Specifically this part (at least in R 2.7), In particular, you should not have a newline between '}' and 'else' to avoid a syntax error in entering a 'if ... else' construct at the keyboard or via 'source'. The R interpreter can't 'see ahead'

[R] Help on extract paramters from fitted models

2008-04-29 Thread Lisa
Hi, I have a question about how to extract paramters from a fitted model. I can extract coefficients and std, but from some other statistics, I dont know how to extract. Can anyone help? Here it is an example: coxout-coxph(Surv(t,t.censor)~x) coxout Call: coxph(formula = Surv(t, t.censor)

Re: [R] Help on extract paramters from fitted models

2008-04-29 Thread Henrique Dallazuanna
See the source code of function: getS3method(print, coxph) is this block: tmp - cbind(coef, exp(coef), se, coef/se, signif(1 - pchisq((coef/se)^2, 1), digits - 1)) On 4/29/08, Lisa [EMAIL PROTECTED] wrote: Hi, I have a question about how to extract paramters from a fitted model. I can

Re: [R] Combine Values into a Vector or List

2008-04-29 Thread Jorge Ivan Velez
Hi Diego, Try this: z-As[A1]+As[A2]; names(z)-z z 4 HTH, Jorge On Tue, Apr 29, 2008 at 2:57 PM, Diego Culattoni [EMAIL PROTECTED] wrote: Thank you Jorge, what I want to have is z - A1+A2 z 4 The problem is that A1, A2,... still unknown, so that I have the following error A1

[R] tcltk

2008-04-29 Thread John P. Burkett
On an x86 machine operating under Gentoo Linux, I'm having trouble with tcltk in R-2.6.1 (the latest version available through Gentoo's emerge/portage system). The problem first came to my attention when install.packages(Rmetrics) produced the following error message: Loading required package:

  1   2   >