Re: [R] package lattice can't be loeaded

2009-07-31 Thread Stein, Luba (AIM SE)
The error message is: Error in library(lattice) : there is no package called 'lattice' I have installed it twice because it did not work the first time, so I was not sure if it worked. And YES, the folder lattice is in the folder library. What's the error message? Why do you have to install

Re: [R] (no subject)

2009-07-31 Thread Stein, Luba (AIM SE)
The error message is: Error in library(lattice) : there is no package called 'lattice' I have installed it twice because it did not work the first time, so I was not sure if the installation worked out. The strange thing is that the folder lattice is in the folder library. Luba

[R] constrained input for optimization algorithm

2009-07-31 Thread Zhi Xie
It seems that optimization algorithm, optim, tries to find optimized parameters within defined lower and upper bounds. In my problem, all the parameters are integers but mutual exclusive. My question is that if there is any means that I can let optim only tries mutual exclusive integers. To be

Re: [R] R 2.9.1: Error building target 'front'

2009-07-31 Thread Loris Bennett
loris.benn...@fu-berlin.de (Loris Bennett) writes: Hi, I am getting the following error # (R-2.9.1/src/library/methods): gmake front /bin/sh: 0403-057 Syntax error at line 1 : `;' is not expected. gmake: *** [front] Error 2 However, I am not sure what script sh is

[R] what is the meaning of this error message?

2009-07-31 Thread Inchallah Yarab
Hi, I need your help :: what i the meaning of this error messageMissing value where true / false needed?? Thank you [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Problem with RGtk2 Rattle

2009-07-31 Thread Felix Andrews
This error comes from using an old version of the GTK+ libraries. Download the latest version for Windows from http://gladewin32.sourceforge.net/ -Felix 2009/7/31 Graham Williams graham.willi...@togaware.com: Hi Wayne - but what version of the other tools have you installed? Regards, Graham

[R] Parameters of Logistic Distribution and (3 Parameter) Log Logistic Distribution

2009-07-31 Thread Madhavi Bhave
Dear R Helpers Please guide me how one can estimate the parameters of Logistic Distribution and 3 Parameter Log-logistic distribution for a given data. data -

Re: [R] Problem with RGtk2 Rattle

2009-07-31 Thread Wayne Murray
Hi Graham I used the update packages option to get the latest version of all the packages I use in R - so whatever the latest versions is what I have. I am not sure if I can ascertain the versions of the various component packages. Regards, Wayne Graham Williams wrote: Hi Wayne - but what

Re: [R] package lattice can't be loeaded

2009-07-31 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 31.07.2009 08:27:24: The error message is: Error in library(lattice) : there is no package called 'lattice' I have installed it twice because it did not work the first time, so I was not sure if it worked. And YES, the folder lattice is in the

Re: [R] what is the meaning of this error message?

2009-07-31 Thread ONKELINX, Thierry
Without your script we can't figure out what went wrong. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section

Re: [R] what is the meaning of this error message?

2009-07-31 Thread Uwe Ligges
Inchallah Yarab wrote: Hi, I need your help :: what i the meaning of this error messageMissing value where true / false needed?? Probably that in your function call there was a missing value where TRUE or FALSE needed? Uwe Ligges Thank you [[alternative HTML version

[R] Trouble with R proxy

2009-07-31 Thread ehxpieterse
Hi there, I am having some trouble getting download.file to work. I have been searching for the answer but my raw coding ability is not at the same level as the solutions I am getting. I have checked my environment and the proxy settings are in line with what I expected:

Re: [R] lmer() and $ operator is invalid for atomic vectors

2009-07-31 Thread ONKELINX, Thierry
Dear Angela, I think you have to omit the last lamba in the lmer code. Is there a reason for putting it there? lmer.lamda - lmer(lamda ~ Age*Item + ( 1 | Subject), data=new4) HTH, Thierry ir. Thierry Onkelinx

Re: [R] CRAN + geography = Cranography

2009-07-31 Thread Romain Francois
Nice, Maybe this could be combined with the map of the R empire as shown at useR! Romain On 07/30/2009 06:39 PM, Barry Rowlingson wrote: In response to an earlier discussion about finding the fastest/best/nearest CRAN site, I geocoded (using my geonames package) the locations of the CRAN

Re: [R] concatenating multiple columns from files

2009-07-31 Thread Stephen Tucker
You can do something like mat - do.call(cbind, lapply(list.files(.data),read.table)) ## explanation: lapply(list.files(.data),read.table) will store all tables in a list do.call(cbind,...) will bind all the columns stored in the list created above. - Original Message From:

[R] Install R on Cygwin

2009-07-31 Thread fabe.malo
Hello, I should use R on cygwin. I have ever install cygwin and now I try to install R. I have read the R manual and particularly the part : Installation R under Unix but I improved some difficulties for succeed in this task. Actually I have create a R repertory where I have unzipped the file

[R] Install R on Cygwin (correction)

2009-07-31 Thread fabe.malo
Hello, I should use R on cygwin. I have ever install cygwin and now I try to install R. I have read the R manual and particularly the part : Installation R under Unix but I improved some difficulties for succeed in this task. Actually I have create a R repertory where I have unzipped the file

Re: [R] Forecasting Inflation

2009-07-31 Thread Dilip Bayas
On Mon, Jul 27, 2009 at 4:51 PM, Dilip Bayas agrikonnect.dilipba...@gmail.com wrote: Dear All, I wanted to forecast Inflation for Indian Economy. please send what techniques to be used after the variable selection. WPI, CPI, Money supply, IIP, Interest rate and so on..How i can use R for

Re: [R] CRAN + geography = Cranography

2009-07-31 Thread Bjørn-Helge Mevik
Barry Rowlingson b.rowling...@lancaster.ac.uk writes: http://www.maths.lancs.ac.uk/~rowlings/R/Cranography/ Absolutely beautiful! Note this is just for fun. No warranties. Maybe I should use a little 'R' as a marker. That would be cool. Maybe I should get a life. :-) -- Bjørn-Helge

[R] colored 3D pillar plots

2009-07-31 Thread Thomas von Känel
hi, I'd like to do graphs like shown on the right panel on the following link: http://www.clinchem.org/cgi/content/full/53/8/1544/F1 (if link doesn't work see attached file) Any help and ideas highly appreciated, thanks in advance. Thomas von Känel Human Genetics Uni Berne

Re: [R] package lattice can't be loeaded

2009-07-31 Thread Stein, Luba (AIM SE)
You are right, the installation went wrong although I do not know why because this never occured to me before. So I unzipped lattice manually and afterwards everything worked fine. Thank you for your help, Luba -Urspr?ngliche Nachricht- Von: Petr PIKAL

Re: [R] gbm package: relationship between interaction.depth and number of features?

2009-07-31 Thread Patrick Connolly
On Thu, 30-Jul-2009 at 12:36AM +0400, Boris Yangel wrote: | Hello. I'm currently stuck with the same what does interaction.depth really | mean stuff. Did you find out what the right answer is? | I stand to be corrected, but I think it is one fewer than the number of leaves in the final tree.

Re: [R] Logistic regression and R

2009-07-31 Thread marlene marchena
Hi there, I take advantage of this chat to ask other question related to logistic regression. This is my first time as well. I have data that I want to model but I’m not sure if glm() is the correct function to use. My problem is as follow, I used Oxford Instability Score of the shoulder (OIS,

[R] any advice on noparametric statistics

2009-07-31 Thread Mao Jianfeng
Dear R-lister and Prof. Harrell, To Prof. Harrell: I feel very sorry to bothering you. The ecological data usually do not follow strictly-defined normal distribution. So, there are many more works before any parametric testing or any regression modeling-fitting . Tens of days ago, when I ask

Re: [R] what is the meaning of this error message?

2009-07-31 Thread Jim Lemon
Inchallah Yarab wrote: Hi, I need your help :: what i the meaning of this error messageMissing value where true / false needed?? Hi Inchallah, This usually happens when you have a conditional (if or while) statement like this: if(var81 == 0) { ... } while(var73 0) { ... } ifelse(var13,

[R] Automatic datasets creation from multiple data sheets in a single excel file

2009-07-31 Thread rajclinasia
Please let us know how to create automatic datasets from multiple data sheets in a single excel file... For example if there are 10 sheets in a single excel file, automatically 10 datasets need to be created at a time when i read an excel file as a whole at once. Please attach the necessary

Re: [R] Logistic regression and R

2009-07-31 Thread ONKELINX, Thierry
Dear Marlene, Have a look at the polr() function in the MASS package. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie

Re: [R] R User Group in Canberra

2009-07-31 Thread John Maindonald
Please add AUSTRALIA Canberra: Canberra R Users Group (CANRUG) http://canrug.togaware.com/ Cheers john. John Maindonald email: john.maindon...@anu.edu.au phone : +61 2 (6125)3473fax : +61 2(6125)5549 Centre for Mathematics Its Applications, Room 1194, John Dedman Mathematical

Re: [R] R User Group listings

2009-07-31 Thread Prof. John C Nash
Further to my posting about R UG mailing lists etc., and David Smith's post about the list he is maintaining (I was aware of his blog, but not that he was updating -- good show), I'm in communication with him to try to ensure we get appropriate information out to useRs. Already there has

Re: [R] constrained input for optimization algorithm

2009-07-31 Thread Prof. John C Nash
As someone very involved with optim and its evolution I can say it is not at all suited to this sort of combinatoric optimization. I don't know if there are packages in R to help out -- it would be nice. If (this may be a big IF) your set of possible combinations is not too large, combn()

Re: [R] (no subject)

2009-07-31 Thread jim holtman
Type: library() at the prompt to see what libraries are known to your system. You might have a path name messed up or something. Here is part of the output that shows on my system with 'lattice' shown Packages in library 'C:/PROGRA~1/R/R-29~1.0/library': base

Re: [R] how use the subset?

2009-07-31 Thread jim holtman
'scan' creates a 'list'; subset is typically used on dataframes. I can get a similar message below: x - list(a=1:10, b=1:10) subset(x, a5) Error in subset.default(x, a 5) : object 'a' not found # now convert the list to a dataframe x.df - as.data.frame(x) subset(x.df, a 5) a b 1 1 1 2 2

[R] what meaning missing value True /False needed

2009-07-31 Thread Inchallah Yarab
This is my code i don't understand the error message: library(rgenoud) rm(list=ls()) set.seed(666) # # As a first step, it is assumed that all input parameters are independent of ageing :

[R] have the value of variable in a function

2009-07-31 Thread Inchallah Yarab
hi , i need to know the value of variable used in a function i don't know if it is easy to do??? thank you [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Retrieving original data frame after repetition

2009-07-31 Thread Jose Iparraguirre D'Elia
Hi Marc (et al) I've spoken too soon... Please, have a look at this chunk of real world data. The data frame a below contains the first ten records (and first two columns) of a survey dataset. It reads as follows: 1662 people have an income of 279, etc. If you see lines 2 and 3, there are

Re: [R] Retrieving original data frame after repetition

2009-07-31 Thread Marc Schwartz
On Jul 31, 2009, at 5:52 AM, Jose Iparraguirre D'Elia wrote: Hi Marc (et al) I've spoken too soon... Please, have a look at this chunk of real world data. The data frame a below contains the first ten records (and first two columns) of a survey dataset. It reads as follows: 1662 people

[R] Getting file name from pdf device?

2009-07-31 Thread Rainer M Krug
Hi IU would like to modify the dev.off function, so that it automatically compresses the created pdf. I am thinking of doing the following in the modified dev.off: 1) Get the filename of the pdf device 2) close the device by calling the original dev.off() 3) compress the pdf file with a system

Re: [R] have the value of variable in a function

2009-07-31 Thread MORNEAU François
Hello, Perhaps have a look at ?debug and ?browser... ... and at fortune(159) in the 'fortunes' package ;) ! Regards, François -Message d'origine- De : r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] De la part de Inchallah Yarab Envoyé : vendredi 31 juillet 2009

Re: [R] colored 3D pillar plots

2009-07-31 Thread Eik Vettorazzi
Hi Thomas, for a start you may use lattice, see fig 6.15 on http://lmdvr.r-forge.r-project.org/figures/figures.html hth. Thomas von Känel schrieb: hi, I'd like to do graphs like shown on the right panel on the following link: http://www.clinchem.org/cgi/content/full/53/8/1544/F1 (if link

[R] how can i delete a message in R-help?

2009-07-31 Thread Inchallah Yarab
Hi i need to delete a message that a send to r -help ?? Can you please tell me how? Thank you [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] what meaning missing value True /False needed

2009-07-31 Thread Sarah Goslee
You are far more likely to get helpful volunteers to answer your questions if you distill your problem down to the smallest point. That's a lot of code to wade through. But since I was waiting for something else to run, I took a stab at it. It also would have been helpful if you'd given the

[R] Preparing for multi-core CPUs and parallel processing applications

2009-07-31 Thread Steve_Friedman
Hello I am fortunate (or in really big trouble) in that the research group I work with will soon be receiving several high end dual quad core machines. We will use the Ubuntu OS on these. We intend to use this cluster for some extensive modeling applications. Our programming guru has

Re: [R] Getting file name from pdf device?

2009-07-31 Thread Dieter Menne
Rainer M Krug-6 wrote: My question: how can I get the filename of the pdf from the device before it is closed? Setting a hook might work (not tried, though) http://finzi.psych.upenn.edu/R/Rhelp08/2009-February/188168.html Dieter -- View this message in context:

Re: [R] how can i delete a message in R-help?

2009-07-31 Thread Sarah Goslee
I'm not sure it's possible, but a good place to start would be the mailman and posting guide links that appear at the bottom of each and every message to the list. Sarah On Fri, Jul 31, 2009 at 9:18 AM, Inchallah Yarabinchallahya...@yahoo.fr wrote: Hi i need to delete a message that a send to

[R] help in using gsub and ?

2009-07-31 Thread ravi
Hi all, I would like to strip the R prompt from a series of code lines and copy the resulting text into a R script. For example, consider the following : # str1- library(MASS) data(Cars93) attach(Cars93) imosaic(data.frame(AirBags,Cylinders,Origin)) str2-gsub('','',str1) ## This

Re: [R] Getting file name from pdf device?

2009-07-31 Thread ONKELINX, Thierry
Dear Rainer, You could have a look at ggsave() from the ggplot2 package. I guess that such an approach to save a plot is easier to combine with a tool like pdftk. HTH, Thierry ir. Thierry Onkelinx Instituut voor

Re: [R] how can i delete a message in R-help?

2009-07-31 Thread Marc Schwartz
On Jul 31, 2009, at 8:18 AM, Inchallah Yarab wrote: Hi i need to delete a message that a send to r -help ?? Can you please tell me how? Thank you You really can't. r-help is a public mailing list with live archives, not only stored by R's various servers, but by several other online

Re: [R] Automatic datasets creation from multiple data sheets in a single excel file

2009-07-31 Thread Dieter Menne
rajclinasia wrote: Please let us know how to create automatic datasets from multiple data sheets in a single excel file... For example if there are 10 sheets in a single excel file, automatically 10 datasets need to be created at a time when i read an excel file as a whole at once.

[R] automate multiple object creation

2009-07-31 Thread waltzmiester
I appreciate all the help I have received from this list and also not being flamed because I am new to R. Many of my problems are in automation so far. I am trying to create multiple objects that are outputs of functions. Here are the tasks:

Re: [R] how can i delete a message in R-help?

2009-07-31 Thread ONKELINX, Thierry
You can't delete post for the mailing list. The posting guide reads: Posters should be aware that the R lists are public discussion lists and anything you post will be archived and accessible via several websites for many years.

Re: [R] tweak a bit the legend wiht ggplot2

2009-07-31 Thread hadley wickham
Hi Benoit, Unfortunately there's currently no way to do that - the legend automatically corresponds to the geom in the plot. Hadley On Thu, Jul 23, 2009 at 11:30 AM, Benoit Boulinguiezbenoit.boulingu...@ensc-rennes.fr wrote: Hi all, I've this ggplot2 graph

Re: [R] Question regarding sqldf

2009-07-31 Thread Rizzo . Michael
My sqldf package was already updated. The result from the example you ran is also missing 2 of the five days so something still isn't working correctly. | | From: | |

[R] Re : what meaning missing value True /False needed

2009-07-31 Thread Inchallah Yarab
Thank you SARAH De : Sarah Goslee sarah.gos...@gmail.com rg Envoyé le : Vendredi, 31 Juillet 2009, 15h21mn 50s Objet : Re: [R] what meaning missing value True /False needed You are far more likely to get helpful volunteers to answer your questions if you

Re: [R] Preparing for multi-core CPUs and parallel processing applications

2009-07-31 Thread Martin Morgan
Hi Steve -- steve_fried...@nps.gov wrote: Hello I am fortunate (or in really big trouble) in that the research group I work with will soon be receiving several high end dual quad core machines. We will use the Ubuntu OS on these. We intend to use this cluster for some extensive modeling

Re: [R] Systematic resampling

2009-07-31 Thread Giovanni Petris
Dear all, This is the sequel to a question of mine a couple of days ago about how to implement systematic resampling from a discrete distribution efficiently. (See below the original question and description of the problem - the problem, in a nutshell, is how to draw N points from a discrete

Re: [R] help in using gsub and ?

2009-07-31 Thread Henrique Dallazuanna
Try this: cat(str2, \n) On Fri, Jul 31, 2009 at 10:30 AM, ravi rv...@yahoo.se wrote: Hi all, I would like to strip the R prompt from a series of code lines and copy the resulting text into a R script. For example, consider the following : # str1- library(MASS) data(Cars93)

Re: [R] Runtime Error with multinom

2009-07-31 Thread Prof Brian Ripley
Well, I get multinom(formula(data),data=data[Z,]) # weights: 6 (0 variable) initial value 0.00 final value 0.00 converged Call: multinom(formula = formula(data), data = data[Z, ]) Coefficients: (Intercept) factor2f factor2g factor2h size Residual Deviance: 0 AIC: 0 Warning

Re: [R] Preparing for multi-core CPUs and parallel processing applications

2009-07-31 Thread Dirk Eddelbuettel
Steve, Martin already mentioned r-sig-hpc and the HPC task view for the bulk of your questions. The Schmidbger et al paper (linked from the Task View) should address a few of your questions. Just two more quick add-ons: On 31 July 2009 at 09:22, steve_fried...@nps.gov wrote: | 5) Can we take

Re: [R] Function to standardize matriz?

2009-07-31 Thread Sam
Yes, I was looking for something to convert to a Z matrix, (the var minus the mean, divided by the standard deviation). Thank you very much for your help! I'll take a look at that. On Thu, Jul 30, 2009 at 2:14 AM, bill.venab...@csiro.au wrote: scale? This transforms the columns of a matrix to

Re: [R] truncating values into separate categories

2009-07-31 Thread Albyn Jones
It appears that your difficulty lies in miscounting the number of intervals. cut(NP, breaks=c(0,1,2,3,4,max(NP))) [1] (0,1] (0,1] (1,2] (0,1] (0,1] (1,2] (1,2] (0,1] (3,4] (0,1] NA (4,6] (2,3] (2,3] (0,1] [16] (4,6] (2,3] (4,6] (0,1] (4,6] (0,1] (1,2] (1,2] (1,2] (3,4] (3,4] (0,1] (1,2]

[R] How to stop an R script when running JGR on a Linux/SuSE system

2009-07-31 Thread mauede
When I need to stop a running R script on Windows or Mac I just use the esc key which kills the current script and returns the control to R interpreter. But when I run R from JGR the esc is useless as well as the other available keyboard keys. Just recently not even clicking on the STOP-symbol

Re: [R] automate multiple object creation

2009-07-31 Thread waltzmiester
I believe this is a little bit closer: rank-function(i,j){ for(i in name1){ for(j in name2){ somers2(i,j) }}} rank(name1,name2) bu still not there waltzmiester wrote: I appreciate all the help I have received from this list and also not being flamed because I

Re: [R] automate multiple object creation

2009-07-31 Thread waltzmiester
x-c(a,b,c,d,e,f) y-rep(c(3,4,5,8),6) z-rep(c(23,24,25,26,27,28),6) name1-sprintf(Pred_pres_%s_indpdt[,%s,,],x,y) name2-sprintf(population[,%s],z) rank-function(i,j){ for(i in name1){ for(j in name2){ somers2(i,j) }}} rank(name1,name2) waltzmiester wrote: I

[R] MLE estimation of constrained mean Singh-Maddala distribution

2009-07-31 Thread Josh Parcel
INTRODUCTION TO THE PROBLEM I am trying to fit a distribution to a dataset. The distribution that I am currently considering is the (3-parameter) Singh-Maddala (Burr) distribution. The final model will fix the mean of the distribution to a given value and estimate the remaining parameters

[R] Matrix Integral

2009-07-31 Thread nhawrylyshyn
Hi, Any help on this would be appreciated: I need to integrate where K is a 4x4 matrix, and SIGMA is a 4x4 matrix from say a to b, i.e. 0 to 5: integral MatrixExp(-K * s) %*% SIGMA %*% t(SIGMA) %*% MatrixExp(t(-K) s) ds t is tranpose , %*% : matrix mult , MatrixExp : matrix exponential I've

Re: [R] R Codes for fitting Logistic Regression for Multivaraite Data

2009-07-31 Thread 1Rnwb
usually i go thru the manuals of the libraries and the data attached with the libraries to get the code working for my data. not a good way but usually it works out. Nimal Fernando wrote: Hi It would be a great help if someone can direct me to access some existing R codes for fitting

[R] Tests for Two Independent Samples

2009-07-31 Thread tedzzx
Dear R users, I have got two samples: sample A with observation of 223: sample A has five categories: 1,2,3,4,5 (I use the numer 1,2,3,4,5 to define the five differen categories) there are 5 observations in category 1; 81 observations in category 2;110 observations in category 3; 27

Re: [R] Antw: How to extract the upper xlim and ylim of my plot?

2009-07-31 Thread 1Rnwb
use hilox-range.x=range(x variable) and hiloy-range.y=range(y variable) or store these values in vectors to be later on user as xlim=hilox, ylim=hiloy Frank Bloos wrote: You may want to use the function corner.label from the plotrix-package. Frank Mark Na mtb...@gmail.com 21.07.2009

Re: [R] Newbie in R: Reading .txt files and storing the 'numbers' in a vector

2009-07-31 Thread 1Rnwb
I am also a newbie, but here are the few thing i do eo=read.table(file=path where you have saved your text file/xxx.txt,header=T, ) #this will only read excelfiles saved as *.csv file attach(eo)

[R] Fill dataframe from a table according to a criteria

2009-07-31 Thread Meenu Sahi
Deare R users I am new to R. What I want to do is explained below;- I have table called States.Prob which is given below Prob of States Changes State1 State2 State3 State4 A Pa1 Pa2 Pa3 Pa4 B Pb1 Pb2 Pb3 Pb4 C Pc1

Re: [R] constrained input for optimization algorithm

2009-07-31 Thread Ravi Varadhan
CRAN task view on optimization and mathematical programming shows the following packages for integer programming: IP (Integer programming, 90C10): glpk, lpSolve, lpSolveAPI, Rcplex, Rglpk, Rsymphony MIP (Mixed integer programming and its variants MILP for LP and MIQP for QP, 90C11): glpk,

[R] function problem

2009-07-31 Thread RRRRRRRRRR!
I have a series of columns that need to be evaluated in various tables. I need to apply a function in the following manner somers2(name1,name2). name1 is a vector of x inputs for the function which correspond to a vector of y inputs in name2. y-rep(c(3,4,5,8),6) z-rep(c(23,24,25,26,27,28),4)

[R] Porting S code to R (USGS Library for S-PLUS for Windows)

2009-07-31 Thread stephen sefick
I would like to port the code contained in http://water.usgs.gov/software/S-PLUS/. Especially the move.1 model. I have downloaded the software, but it doesn't seem to display correctly in smultron or text edit. This I believe is a windows binary distribution. I have sent a message through the

Re: [R] function problem

2009-07-31 Thread Steve Lianoglou
Hi, On Jul 31, 2009, at 12:25 PM, RR! wrote: I have a series of columns that need to be evaluated in various tables. I need to apply a function in the following manner somers2(name1,name2). name1 is a vector of x inputs for the function which correspond to a vector of y inputs in

Re: [R] Scatter Plot

2009-07-31 Thread baptiste auguie
please Cc. the list next time Two suggestions, 1) read the help page, e.g. ?points would have told you why pch=10 produces 1. 2) Try the following and see which you prefer, x = y = labels = 1:20 ?text plot(x, y, type='n') # empty plot text(x, y, paste(labels)) library(ggplot2) ?qplot

Re: [R] Tests for Two Independent Samples

2009-07-31 Thread Ted Harding
On 31-Jul-09 13:38:10, tedzzx wrote: Dear R users, I have got two samples: sample A with observation of 223: sample A has five categories: 1,2,3,4,5 (I use the numer 1,2,3,4,5 to define the five differen categories) there are 5 observations in category 1; 81 observations in

Re: [R] Fill dataframe from a table according to a criteria

2009-07-31 Thread John Kane
Your posting arrives as plain text so it is impossible to see what you had highlighed in red. Also it is very difficult to see what is in that data.frame. Could you either reduce the data.frame to make minimal, self-contained, reproducible code. A good approach might be to use dput to

Re: [R] Question regarding sqldf

2009-07-31 Thread Gabor Grothendieck
Your sql statement is using a variable in the having clause that is not in the group by clause. Given that group by is supposed to produce a single output per group we see that this construct is problematic since what should happen in the case that there are two equal maximum values in the same

Re: [R] function problem

2009-07-31 Thread RRRRRRRRRR!
I am sorry I should have stated the whole problem: I appreciate all the help I have received from this list and also not being flamed because I am new to R. Many of my problems are in automation so far. I am trying to create multiple objects that are outputs of functions. Here are the tasks:

[R] xyplot with 2 panels and 2 different x-scales

2009-07-31 Thread taz9
Hi All, I have this data: type-c(country,country,country,world,world,world) place-c(A,B,C,A,B,C) rank-c(1,3,5,512,420,320) df1-data.frame(type,place,rank) and need to produce an xyplot with 2 panels, where the x-values are labelled: xyplot(place~rank|type, data=df1, panel= function(x, y,

[R] merging two data frame with colomns of different length

2009-07-31 Thread Julien Beguin
Dear all, I am trying to merge two data frames based on a common column but for this common column both data frame do not have the same length and associated information. I checked previous exemples in the list but was not able to apply them in my case... Is someone know how to do that? Below is

Re: [R] xyplot with 2 panels and 2 different x-scales

2009-07-31 Thread taz9
I used the scales relation to obtain different x-scales for each panel. However, there's a gap between the 2 panels. Any ideas on how I could remove it? xyplot(place~rank|type, data=df1, scales=(relation=free), panel= function(x, y, ..., subscripts) { panel.xyplot(x,y,...,

[R] about BRugs package

2009-07-31 Thread Zuofeng Shang
Hi all, There seems a problem when I was installing this package. This question has been frequently asked but I didn't find any clue to solve it from previous answers and comments. And please forgive me if my question has been really answered before! My system is windows xp and R is 2.7x, when

Re: [R] merging two data frame with colomns of different length

2009-07-31 Thread Julien Beguin
I forgot to mention that I tried with merge and join (package analogue) without success... Julien Selon Julien Beguin julien.begui...@ulaval.ca, 31.07.2009: Dear all, I am trying to merge two data frames based on a common column but for this common column both data frame do not have the

Re: [R] about BRugs package

2009-07-31 Thread Uwe Ligges
Zuofeng Shang wrote: Hi all, There seems a problem when I was installing this package. This question has been frequently asked but I didn't find any clue to solve it from previous answers and comments. And please forgive me if my question has been really answered before! My system is windows

[R] x and y Error Bars

2009-07-31 Thread Buckmaster, Sarah
Hi All, I have a question about plotting a one-to-one line and x-and-y error bars on a scatterplot for my data. I just can't seem to work it out! I have data from an experiment with 7 different treatment levels with 3 replicates, that is set-out as follows: Treatment LevelReplicate

Re: [R] xyplot with 2 panels and 2 different x-scales

2009-07-31 Thread baptiste auguie
Hi, you want only the x scale to be free, xyplot(place~rank|type, data=df1, panel= function(x, y, ..., subscripts) { panel.xyplot(x,y,..., subscripts) require(grid) panel.grid(h = -1,v = 0, lty=dotted) grid.text(unit(x,native),

[R] Displaying function arguments using a Windows R console

2009-07-31 Thread Laura S.
I am relatively new to R, and would appreciate any suggestions you may have. I noticed on a Mac the functions' arguments are listed at the bottom of the R console. Is it possible to add such a feature to a Windows R console? I have Windows XP if that helps. I know function arguments can be

[R] Creating a column based on data in another column

2009-07-31 Thread Mehdi Khan
hello all, I have a data frame and I want to create a column which assigns a letter based upon the value in another column. The data column has velocities ranging from 0 to 1000. So for example, for velocities between 0 and 300 I'd like to assign the letter A in the new column, for 300-600, B

Re: [R] x and y Error Bars

2009-07-31 Thread Ben Bolker
Sarah B wrote: Hi All, I have a question about plotting a one-to-one line and x-and-y error bars on a scatterplot for my data. I just can't seem to work it out! I have data from an experiment with 7 different treatment levels with 3 replicates, that is set-out as follows:

Re: [R] Creating a column based on data in another column

2009-07-31 Thread Jorge Ivan Velez
Dear Medhi, Take a look at ?cut or ?recode (in the car package). HTH, Jorge On Fri, Jul 31, 2009 at 3:04 PM, Mehdi Khan wrote: hello all, I have a data frame and I want to create a column which assigns a letter based upon the value in another column. The data column has velocities

Re: [R] Getting file name from pdf device?

2009-07-31 Thread cameron.bracken
Rainer M Krug-6 wrote: Hi IU would like to modify the dev.off function, so that it automatically compresses the created pdf. I am thinking of doing the following in the modified dev.off: 1) Get the filename of the pdf device 2) close the device by calling the original dev.off() 3)

Re: [R] Creating a column based on data in another column

2009-07-31 Thread Dimitris Rizopoulos
have a look at ?cut(); for instance, x - sample(1000, 20, TRUE) x cut(x, c(0, 300, 600, 1000), c(A, B, C)) I hope it helps. Best, Dimitris Mehdi Khan wrote: hello all, I have a data frame and I want to create a column which assigns a letter based upon the value in another column. The

Re: [R] Creating a column based on data in another column

2009-07-31 Thread Henrique Dallazuanna
Try this: cut(sample(0:1000, 100), breaks = c(0, 300, 600, 900, 1000), labels = c('A', 'B', 'C', 'D')) On Fri, Jul 31, 2009 at 4:04 PM, Mehdi Khan mwk...@ucdavis.edu wrote: hello all, I have a data frame and I want to create a column which assigns a letter based upon the value in another

[R] automation question

2009-07-31 Thread RRRRRRRRRR!
I have columns in two tables that need to be compared in order to get a statistic. The function calculating the statistic is somers2. Here are the two columns I must calculate, row by row. name1 name2 1 Pred_pres_a_indpdt[,3,,] population[,23] 2

Re: [R] merging two data frame with colomns of different length

2009-07-31 Thread Etienne B. Racine
Salut Julien, t1 - table(data1$Id01) t2 - table(data2$Id02) # compute difference between the two tables diff - t1-t2 # create your data frame from data2 res - data2 names(res)[1] - Id01 lsAdd - rep(attributes(diff)$dimnames[[1]],diff) defVal - NA rbind(res,data.frame(Id01 =lsAdd,

Re: [R] merging two data frame with colomns of different length

2009-07-31 Thread Henrique Dallazuanna
Try this: merge(transform(data1, .Id01 = ave(as.character(Id01), Id01, FUN=seq)), transform(data2, .Id02 = ave(as.character(Id02), Id02, FUN=seq)), by.x = c('Id01', '.Id01'), by.y = c('Id02', '.Id02'), all = TRUE) On Fri, Jul 31, 2009 at 3:05 PM, Julien Beguin

[R] scale subset of data

2009-07-31 Thread Noah Silverman
Hi, This should be an easy one, but I have some trouble formatting the data right I'm trying to replace the column of a subset of a dataframe with the scaled data for that column of the subset subset(rawdata, code== foo, select = a) - scale( subset(rawdata, code== foo, select = a) ) It

Re: [R] automation question

2009-07-31 Thread stephen sefick
look at the apply family of functions and look at the MARGIN argument. On Fri, Jul 31, 2009 at 2:30 PM, RR!cwal...@usgs.gov wrote: I have columns in two tables that need to be compared in order to get a statistic. The function calculating the statistic is somers2. Here are the two

Re: [R] scale subset of data

2009-07-31 Thread Steve Lianoglou
Hi, On Jul 31, 2009, at 4:13 PM, Noah Silverman wrote: Hi, This should be an easy one, but I have some trouble formatting the data right I'm trying to replace the column of a subset of a dataframe with the scaled data for that column of the subset subset(rawdata, code== foo, select = a)

  1   2   >