[R] discrete probability distribution

2006-02-23 Thread Robin Hankin
Hi I want to sample from a discrete random variable X, defined on the non-negative integers, with prob(X=0) = (1-p) prob(X=1) = (1-p)*p ... prob(X=i)=(1-p)*p^i ... Before reinventing the wheel, is there a ready-made R function to give me such a thing? -- Robin Hankin Uncertainty Analyst

[R] [R-pkgs] adehabitat version 1.4

2006-02-23 Thread Clément Calenge
Dear all, I have just uploaded to CRAN the version 1.4 of the package 'adehabitat'. Significant changes are listed below: - The eigenanalysis of selection ratios (Calenge and Dufour, 2006, Ecology) can now be performed using the function eisera(). It can be used for the analysis of habitat

Re: [R] discrete probability distribution

2006-02-23 Thread Matthias Kohl
Hi, have a look at http://mathworld.wolfram.com/GeometricDistribution.html respectively http://mathworld.wolfram.com/NegativeBinomialDistribution.html with r = 1. In R have a look at ?rnbinom with n = 1 and in your case: prob = 1-p hth Matthias Hi I want to sample from a discrete random

[R] Questions for manipulating datasets in R e.g. sorting and matching

2006-02-23 Thread Stefanie von Felten, IPWIfU
Hello everyone, I want to sort a dataset in R, using multiple columns as sorting criteria. I know I can sort a dataset Data with 14 columns using one column (the fifth), by typing: DataSort-Data[order(Data[,5]),1:14] But how can the dataset be sorted by column 5, then by 6, then by 8?

Re: [R] discrete probability distribution

2006-02-23 Thread Ted Harding
On 23-Feb-06 Robin Hankin wrote: Hi I want to sample from a discrete random variable X, defined on the non-negative integers, with prob(X=0) = (1-p) prob(X=1) = (1-p)*p ... prob(X=i)=(1-p)*p^i ... Before reinventing the wheel, is there a ready-made R function to give me such

Re: [R] Questions for manipulating datasets in R e.g. sorting andmatching

2006-02-23 Thread Dimitris Rizopoulos
regarding your 1st question you can still use order(), i.e., order(Data[,5], Data[,6], Data[,8]); regarding you 2nd question look at ?merge. I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven

Re: [R] Questions for manipulating datasets in R e.g. sorting and matching

2006-02-23 Thread Christian Montel
hi steffi, try DataSort-Data[order(Data[,5],Data[,6],Data[,8]),1:14] and for further details ?order. For matching try ?merge. Best Regards, Christian Stefanie von Felten, IPWIfU schrieb: Hello everyone, I want to sort a dataset in R, using multiple columns as sorting criteria. I know I

Re: [R] Problems building R 2.2.1 with libgoto and SSE2 enabled

2006-02-23 Thread Prof Brian Ripley
[This sort of highly technical non-R issue would be better discussed on the R-devel list. See the R posting guide.] Do note the comments in the R-admin manual. R requires proper results with IEEE754 specials (Infs and NaNs) and switching on fast arithmetic options often calls failures

[R] automatic generation of variable names

2006-02-23 Thread Benjamin Otto
Hi, is there some way to generate a varaible name automatically? What I would like to do is: Instead --- table1 - orderbysomecolumn table2 - orderbysomecolumn table3 - orderbysomecolumn ... automate for (i in 1:numoftables) { table%someconcatenation%i - orderbysomecolumn }

Re: [R] Problems building R 2.2.1 with libgoto and SSE2 enabled

2006-02-23 Thread Peter Dalgaard
Ivan Adzhubey [EMAIL PROTECTED] writes: Hi, I am trying to build R 2.2.1 with Kazushige Goto's BLAS library (libgoto) and encountered a problem: I have two computers with the almost identical hardware (P4 Northwood CPU, i875 chipset, 2GB DDR400 RAM) and identical Linux OS. I have the

Re: [R] automatic generation of variable names

2006-02-23 Thread Uwe Ligges
Benjamin Otto wrote: Hi, is there some way to generate a varaible name automatically? See the R FAQs: How can I turn a string into a variable? Uwe Ligges What I would like to do is: Instead --- table1 - orderbysomecolumn table2 - orderbysomecolumn table3 -

[R] Need confirmation of my lme() structure

2006-02-23 Thread lescroel_cebc
Hello, I'm a new user of R and I would need somebody to confirm (or not!) that I'm doing right. I'm analyzing diving characteristics (maximal depth, etc...) of birds breeding in 2 sites, during 2 stages (see data structiring below). FILESITE STAGE M04:402 C: 471

[R] Strange p-level for the fixed effect with lme function

2006-02-23 Thread Petar Milin
Hello, I ran two lme analyses and got expected results. However, I saw something suspicious regarding p-level for fixed effect. Models are the same, only experimental designs differ and, of course, subjects. I am aware that I could done nesting Subjects within Experiments, but it is expected to

[R] tcl/tk - Problem unter MacOS X / X11

2006-02-23 Thread Achim Kayser
Hallo ! Ich habe versucht Rcmdr unter MacOSX 10.4.5 zu installieren. RGui zeigt an, dass tcl/tk laufen. Bei Aufruf von Rcmdr friert R jedoch komplett ein. JGR zeigt im Paketmanager dagegen an, dass tcl/tk nicht gestartet werden konnte und spuckt folgende Meldung aus: library(tcltk) Loading

Re: [R] Strange p-level for the fixed effect with lme function

2006-02-23 Thread Peter Dalgaard
Petar Milin [EMAIL PROTECTED] writes: Hello, I ran two lme analyses and got expected results. However, I saw something suspicious regarding p-level for fixed effect. Models are the same, only experimental designs differ and, of course, subjects. I am aware that I could done nesting Subjects

[R] JGR problem with installPackages()?

2006-02-23 Thread Michael Kubovy
Dear r-helpers, When I pull down the Packages:Package Installer menu, I get: == installPackages() stack imbalance in .External, 22 then 66 stack imbalance in -, 20 then 64 stack imbalance in -, 117 then 118 stack imbalance in {, 115 then 116 stack imbalance in

Re: [R] automatic generation of variable names

2006-02-23 Thread Duncan Murdoch
On 2/23/2006 5:32 AM, Uwe Ligges wrote: Benjamin Otto wrote: Hi, is there some way to generate a varaible name automatically? See the R FAQs: How can I turn a string into a variable? Especially the last bit of advice there, which suggests using a list instead. Duncan Murdoch Uwe

[R] calculation problem

2006-02-23 Thread Amir Safari
Dear R users, I hope this mailing list be the right place for my question. Usaully performance criterion of curve fitting like as Directinal Symmetry (DS) and Mean Absolute Percentage Error (MAPE) are correctly used with absolute time series which includes only positive

Re: [R] automatic generation of variable names

2006-02-23 Thread Benjamin Otto
Thanks for the quick help! regards, Benjamin __ 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

[R] [R-pkgs] pls version 1.2-0

2006-02-23 Thread Bjørn-Helge Mevik and Ron Wehrens
Version 1.2-0 of the pls package is now available on CRAN. The pls package implements partial least squares regression (PLSR) and principal component regression (PCR). Features of the package include - Several plsr algorithms: orthogonal scores, kernel pls and simpls - Flexible cross-validation

Re: [R] Strange p-level for the fixed effect with lme function

2006-02-23 Thread Prof Brian Ripley
What code did you actually run to get what you labelled as 'ANOVA'? If this was anova[.lme], the default type is sequential, whereas the t-values (from summary[.lme], I presume) are from marginal tests. Whether sequential and marginal tests are similar or even the same is a question of balance

[R] read file of EXCEL format

2006-02-23 Thread XinMeng
Hello sir: How can I read data file of EXCEL format from disk(d:\\data.XLS for example)? I can only read data file of .txt format read.delim(d:\\data.txt,header=T,as.is=T),but only EXCEL format is available at present. Thanks a lot __

[R] Bug in setting GUI to SDI mode?

2006-02-23 Thread michael watson \(IAH-C\)
Hi I did a google search on this and came up with nothing. OK, in the latest release of R for windows, I want to change the gui to SDI mode. Edit - GUI preferences Choose SDI Apply I get the message about properties not being able to be changed on a running console, and that I need to save.

[R] tcl/tk - Install problem using MacOS X / X11

2006-02-23 Thread Achim Kayser
Hi Sorry, my first post was in German. I tried to get Rcmdr running under MacOS X 10.4.5. While RGui pretends that tcltk is running, starting Rcmdr freezes R completely. Instead, JGR which gave me the following results: library(tcltk) Loading Tcl/Tk interface ... Error in fun(...) : no

Re: [R] read file of EXCEL format

2006-02-23 Thread Chuck Cleland
XinMeng wrote: Hello sir: How can I read data file of EXCEL format from disk(d:\\data.XLS for example)? I can only read data file of .txt format read.delim(d:\\data.txt,header=T,as.is=T),but only EXCEL format is available at present. Here is one way to read it directly:

Re: [R] read file of EXCEL format

2006-02-23 Thread Sean Davis
http://cran.r-project.org/doc/manuals/R-data.html#Reading-Excel-spreadsheets On 2/23/06 8:49 AM, XinMeng [EMAIL PROTECTED] wrote: Hello sir: How can I read data file of EXCEL format from disk(d:\\data.XLS for example)? I can only read data file of .txt format

Re: [R] read file of EXCEL format

2006-02-23 Thread Prof Brian Ripley
Please see the 'R Data Import/Export Manual' which ships with every copy of R. On Thu, 23 Feb 2006, XinMeng wrote: Hello sir: How can I read data file of EXCEL format from disk(d:\\data.XLS for example)? I can only read data file of .txt format

Re: [R] Bug in setting GUI to SDI mode?

2006-02-23 Thread Ales Ziberna
You should save it to C:\Program File\R\2.2.1\etc Best, Ales Ziberna michael watson (IAH-C) pravi: Hi I did a google search on this and came up with nothing. OK, in the latest release of R for windows, I want to change the gui to SDI mode. Edit - GUI preferences Choose SDI Apply

Re: [R] Bug in setting GUI to SDI mode?

2006-02-23 Thread Duncan Murdoch
On 2/23/2006 8:33 AM, michael watson (IAH-C) wrote: Hi I did a google search on this and came up with nothing. OK, in the latest release of R for windows, I want to change the gui to SDI mode. Edit - GUI preferences Choose SDI Apply I get the message about properties not being

Re: [R] Bug in setting GUI to SDI mode?

2006-02-23 Thread Uwe Ligges
michael watson (IAH-C) wrote: Hi I did a google search on this and came up with nothing. OK, in the latest release of R for windows, I want to change the gui to SDI mode. Edit - GUI preferences Choose SDI Apply I get the message about properties not being able to be changed on a

Re: [R] Bug in setting GUI to SDI mode?

2006-02-23 Thread Sundar Dorai-Raj
michael watson (IAH-C) wrote: Hi I did a google search on this and came up with nothing. OK, in the latest release of R for windows, I want to change the gui to SDI mode. Edit - GUI preferences Choose SDI Apply I get the message about properties not being able to be changed on

Re: [R] Bug in setting GUI to SDI mode?

2006-02-23 Thread Liaw, Andy
The file needs to be in R_HOME\etc. See ?Rconsole. Andy From: michael watson (IAH-C) Hi I did a google search on this and came up with nothing. OK, in the latest release of R for windows, I want to change the gui to SDI mode. Edit - GUI preferences Choose SDI Apply I get

Re: [R] Bug in setting GUI to SDI mode?

2006-02-23 Thread michael watson \(IAH-C\)
Woops! RTFM for me :( Thanks everyone for your help. Mick -Original Message- From: Liaw, Andy [mailto:[EMAIL PROTECTED] Sent: 23 February 2006 13:57 To: michael watson (IAH-C); r-help@stat.math.ethz.ch Subject: RE: [R] Bug in setting GUI to SDI mode? The file needs to be in

Re: [R] read file of EXCEL format

2006-02-23 Thread bady
hi, hi all, there are several possibilities to import data in Excel format. you can use the fonctions odbcConnectExcel,read.xls, ... (see http://cran.r-project.org/doc/manuals/R-data.html) require(RODBC) ?odbcConnect library(gdata) ?read.xls regards, P.BADY Selon XinMeng [EMAIL

Re: [R] User Bug in setting GUI to SDI mode?

2006-02-23 Thread Prof Brian Ripley
On Thu, 23 Feb 2006, michael watson (IAH-C) wrote: I did a google search on this and came up with nothing. You were asked (in the posting guide) to read the R documentation, and this _is_ in the rw-FAQ and also in ?Rconsole. OK, in the latest release of R for windows, I want to change the

[R] partial mantel test

2006-02-23 Thread alexa
I would like to know how to run a partial mantel test controlling for spatial autocorrelation and correlation with other environmental variables. It seems that with function included in vegan for partial mantel test I can only test for the relationship between two variables controlling for

[R] Cross-validation in SVM

2006-02-23 Thread Amir Safari
Dear David, Dear R Users, Calculation of Cross-Validation for SVM, with thoese time series which include negative and positive values ( for example return of a stock exchange index) must be different from a calculation of Cross-Validation with time series which includes

[R] locpoly

2006-02-23 Thread Amir Safari
Dear R Users, When using locpoly function, number of output values is smaller than the number of input values. How is it possible to get number of output component $y equal to the number of inputs. Thanks a lot, Amir -

Re: [R] tcl/tk - Install problem using MacOS X / X11

2006-02-23 Thread John Fox
Dear Achim, I'm not a Mac user, so can only offer limited help, but I wonder whether you've looked at the Rcmdr installation notes at http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html? There are instructions there for getting the Rcmdr package working on Macs. I hope that

[R] Problem with List() Inside Function

2006-02-23 Thread Peter Lauren
I have a function declared thus. FirstEigenvectorBoundary.Training - function(InputFileName='C:/Samples2/PT_Amp.txt', Header=TRUE, Colour=red) Inside the function, I have the following call out-list(x=Eigenvectors[2:(NumMetricsSelected+1),1], y=-0.8, z=NumMetricsSelected); NumMetricsSelected

[R] Changing the x-axis labels in plot()

2006-02-23 Thread michael watson \(IAH-C\)
Hi Hopefully this one isn't in the manual or I am about to get shot :-S One of my colleagues wants a slightly strange graph. We basically have a data matrix, and she wants to plot, for each row, the values in the row as points on the graph. The following code draws the graph just fine:

Re: [R] partial mantel test

2006-02-23 Thread Sarah Goslee
Hi Alexandra, I have an R package that includes a partial Mantel function that can handle multiple partials. We're doing the final testing of this package, and are about ready to submit it to CRAN. I can email you the current version if you'd like. (What OS?) Sarah On 2/23/06, [EMAIL PROTECTED]

Re: [R] tcl/tk - Problem unter MacOS X / X11

2006-02-23 Thread Rob J Goedman
Achim, For the RGUI part: Have you installed the required packages for Rcmdr (e.g. abind, car, effects, lmtest, multcomp, mvtnorm, relimp, sandwich, strucchange, and zoo)? Rob On Feb 23, 2006, at 3:01 AM, Achim Kayser wrote: Hallo ! Ich habe versucht Rcmdr unter MacOSX 10.4.5 zu

Re: [R] Cross-validation in SVM

2006-02-23 Thread Achim Zeileis
On Thu, 23 Feb 2006, Amir Safari wrote: Calculation of Cross-Validation for SVM, with thoese time series which include negative and positive values ( for example return of a stock exchange index) must be different from a calculation of Cross-Validation with time series which includes just

Re: [R] Convertin rows of a matrix to a list

2006-02-23 Thread Aleš Žiberna
Thanks to all, especially to Patrick Burns, who's solution is the fastest! Best regards, Ales Patrick Burns pravi: Untried, but does this work for you: split(mat, row(mat)) Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for

Re: [R] tcl/tk - Problem unter MacOS X / X11

2006-02-23 Thread Achim Kayser
Thanks Rob ! That was it ! I had forgotten two of them. Now the GUI comes up nicely. I' ll test it out an keep you posted. Regards Achim Rob J Goedman schrieb: Achim, For the RGUI part: Have you installed the required packages for Rcmdr (e.g. abind, car, effects, lmtest, multcomp,

[R] svyby and svyratio in the Thomas Lumley's survey package

2006-02-23 Thread Smith, Phil
Dear R-ers: I'm using Thomas Lumley's survey package. I'd like to compute survey ratio estimates (numerator=~utd , denominator=~one) for each of serval domains using by=~factor(domain). I can't quite work out the syntax for the call to the svyby function. I try: svyby( numerator=~ utd,

Re: [R] Changing the x-axis labels in plot()

2006-02-23 Thread Berton Gunter
Please learn how to use R's extensive Help capabilities -- It **is** in the manual -- and also in the R-help archives. help.search('axis') (obvious keyword, no?) will get you what you want. -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA -Original Message-

[R] dist() between groups of data

2006-02-23 Thread Henrik Parn
Dear all, I have a data set with x and y positions of nests. Each nest can be grouped according to a factor z. I have made a small dummy data set, where the grouping variable z is 0 or 1: x - runif(6) y - runif(6) z - rep(c(0,1), each=3) xyz - cbind(x,y,z) xyz x y z [1,]

[R] Feature request in setting GUI to SDI mode?

2006-02-23 Thread Dirk Eddelbuettel
R looks for Rconsole in $HOME as well. I don't like to cluster $HOME with visible files, so I was wondering if R could also look for $HOME/.Rconsole to hide Rconsole in $HOME. That would be the best of both worlds. Thanks, Dirk -- Hell, there are no rules here - we're trying to

Re: [R] Changing the x-axis labels in plot()

2006-02-23 Thread Marc Schwartz (via MN)
On Thu, 2006-02-23 at 15:35 +, michael watson (IAH-C) wrote: Hi Hopefully this one isn't in the manual or I am about to get shot :-S Bang ;-) One of my colleagues wants a slightly strange graph. We basically have a data matrix, and she wants to plot, for each row, the values in the

Re: [R] do.call, browser and traceback

2006-02-23 Thread hadley wickham
If f is long then you can get some savings like this: do.call(f, mtcars) # note: used f rather than f Unfortunately, my f is a character vector containing the function I want to call. Thanks for the idea though. Hadley __

Re: [R] locpoly

2006-02-23 Thread Duncan Murdoch
On 2/23/2006 9:56 AM, Amir Safari wrote: Dear R Users, When using locpoly function, number of output values is smaller than the number of input values. How is it possible to get number of output component $y equal to the number of inputs. You could use linear interpolation on

Re: [R] Changing the x-axis labels in plot()

2006-02-23 Thread Duncan Murdoch
On 2/23/2006 10:35 AM, michael watson (IAH-C) wrote: Hi Hopefully this one isn't in the manual or I am about to get shot :-S One of my colleagues wants a slightly strange graph. We basically have a data matrix, and she wants to plot, for each row, the values in the row as points on the

[R] binomial models with too many 1s???

2006-02-23 Thread I.Szentirmai
Dear R users, Does anyone know a solution for the problem when there are too many ones or zeros in the respons of a binomial model? I think this means that the data are over/under despersed and the result is very bad model fit. I'm using glmmPQL(family=quasibinomial) to fit a model to my

[R] R function use in C returning a list

2006-02-23 Thread Vumani Dlamini
Dear R users, Is it possible to use an R function accepting several arguments and returning a list in C code. I notice that in all examples only one variable is returned. Here is the C part I feel is giving the problems, SEXP R_fcall, ans; PROTECT(R_fcall = lang2(likelihood,

[R] useR! 2006 - 2006-02-28 Submission Deadline

2006-02-23 Thread Torsten Hothorn
Dear useRs, The submission deadline for `useR! 2006', the second R user conference to be held in Vienna June 15-17 2006, is only five days ahead. So this weekend is the perfect time to submit abstracts for user-contributed sessions! The sessions will be a platform to bring together R users,

[R] memory managment under Windows XP

2006-02-23 Thread r user
I am using R 2.2.1 in a Windowes XP environment. I work with very large datasets, and occassionally run out of memory. I have modified my boot.ini file to use the /3gb switch. I also run the following line after I launch R ( I am unsure if it is helpful). memory.limit(size = 4095) Please

Re: [R] Changing the x-axis labels in plot()

2006-02-23 Thread Peter Dalgaard
michael watson (IAH-C) [EMAIL PROTECTED] writes: Hi Hopefully this one isn't in the manual or I am about to get shot :-S *Kapow*... [1] One of my colleagues wants a slightly strange graph. We basically have a data matrix, and she wants to plot, for each row, the values in the row as

Re: [R] do.call, browser and traceback

2006-02-23 Thread Prof Brian Ripley
On Mon, 20 Feb 2006, hadley wickham wrote: A problem that I've encountered when using do.call a lot is very large stack traces, eg: f - function(x) stop() do.call(error, mtcars) traceback() f - function(x) browser() do.call(f, mtcars) Did you mean that? Both are errors. Perhaps f -

Re: [R] binomial models with too many 1s???

2006-02-23 Thread mike waters
I take it that a zero inflated negative binomial (i.e. Poisson) regression model is what you are trying to fit, aka ZIP? If so try looking at the documentation for the zicounts package for R, for one. Of course, you can also search on these keywords yourself, to find exactly what you want

Re: [R] do.call, browser and traceback

2006-02-23 Thread hadley wickham
Did you mean that? Both are errors. Perhaps f - function(...) browser() do.call(f, mtcars) Sorry, yes, that is what I meant. What is being used is Rprintf(Called from: ); PrintValueRec(cptr-call,rho); in src/main/main.c. We could certainly allow an option to limit

Re: [R] locpoly

2006-02-23 Thread Liaw, Andy
From: Duncan Murdoch On 2/23/2006 9:56 AM, Amir Safari wrote: Dear R Users, When using locpoly function, number of output values is smaller than the number of input values. How is it possible to get number of output component $y equal to the number of inputs. You could

Re: [R] memory managment under Windows XP

2006-02-23 Thread Liaw, Andy
There are plenty in the the list archive, one of which is to switch to a run 64-bit R on a 64-bit platform with lots of physical RAM. Such hardware is quite affordable these days (certainly cheaper than most commercial software that you'd have to buy if you didn't have R). Andy From: r user

Re: [R] svyby and svyratio in the Thomas Lumley's survey package

2006-02-23 Thread Thomas Lumley
On Thu, 23 Feb 2006, Smith, Phil wrote: Dear R-ers: I'm using Thomas Lumley's survey package. I'd like to compute survey ratio estimates (numerator=~utd , denominator=~one) for each of serval domains using by=~factor(domain). I can't quite work out the syntax for the call to the svyby

Re: [R] memory managment under Windows XP

2006-02-23 Thread roger bos
And of course using rm(...) to clean up objects you no longer need. No amount of physical memory can save you from grossly inefficient code and large memory leaks. For example, lets say I have a large testMat object that I use time period. I loop though each month using for loops. Even though

Re: [R] Problem with List() Inside Function

2006-02-23 Thread Patrick Burns
My solution when I run into mysteries like this is to put browser() in the function just before or after the line of interest. The magnitude and direction of my stupidity usually become clear quickly. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S

[R] Consultants Needed

2006-02-23 Thread Charles Partridge
Group, My colleagues and I are considering compiling a network of Ohio users of [R], who would are interested in consulting with local agencies throughout Ohio who are interested in learning the software. If you are interested in being a consultant, please contact me off-list. In addition, if

Re: [R] Problem with List() Inside Function

2006-02-23 Thread Berton Gunter
Is the following from Patrick Burns another pearl for the fortunes package? -- Bert Gunter * My solution when I run into mysteries like this is to put browser() in the function just before or after the line of interest. The magnitude and direction of my

[R] R and marine protected areas: algorithms for site selection

2006-02-23 Thread Eric Pante
Dear listers, a central problem in conservation biology is the selection of sites in reserve network design. many algorithms have been published, and I was wondering any have been implemented in R. I did not seen anything on CRAN or R-help, or on the web in general. Best regards, Eric Eric

Re: [R] memory managment under Windows XP

2006-02-23 Thread Prof Brian Ripley
On Thu, 23 Feb 2006, roger bos wrote: And of course using rm(...) to clean up objects you no longer need. No amount of physical memory can save you from grossly inefficient code and large memory leaks. For example, lets say I have a large testMat object that I use time period. I loop

[R] Need a hint

2006-02-23 Thread Mike Saunders
R community: I have been creating code for plotting nomographs, or multiple, overlain contour plots of z-variables on a common x- and y- variable. My input has been a matrix with observed x, y, and multiple z variables; I then create a trend surface using trmat for each z-variable. So far so

Re: [R] Need a hint

2006-02-23 Thread Gregory Snow
Here are a couple of quick thoughts on your problem. 1. Use alpha channels (may require you to produce all your graphs as pdf files). Fill each of your criteria categories with a mostly transparent color, e.g. the full contour of z[1] between 20 and 30 is 20% opaque and the full contour(s) of

[R] siegel-tukey test

2006-02-23 Thread charles liard
Hi, I'm a frequent R user and ran into a message from 2004 in which someone wants to use R for a Siegel-Tukey test. To the best of my knowledge (and I've checked a lot), there is no way to do this in R. However, I've set up some R code that requires the sue of an executable program made with

[R] Working with lists with numerical names

2006-02-23 Thread Christopher Swingley
Greetings! I'm have a hard time working with some data I imported from a baseball database. Several of the database columns have numbers in them (2B, 3B), and when I try to use these vectors from the data frame, I get syntax errors, probably because it's interpreting the name as a number:

Re: [R] Working with lists with numerical names

2006-02-23 Thread Sundar Dorai-Raj
Christopher Swingley wrote: Greetings! I'm have a hard time working with some data I imported from a baseball database. Several of the database columns have numbers in them (2B, 3B), and when I try to use these vectors from the data frame, I get syntax errors, probably because it's

Re: [R] Working with lists with numerical names

2006-02-23 Thread jim holtman
x playerID yearID stint teamID lgID G AB R H 2B 3B HR RBI SB CS BB 1 robleos01 2005 1LAN NL 110 364 44 99 18 1 5 34 0 8 31 2 iguchta01 2005 1CHA AL 135 511 74 142 25 6 15 71 15 5 47 3 molinya01 2005 1SLN NL 114 385 36 97 15 1 8 49 2 3 23

Re: [R] Working with lists with numerical names

2006-02-23 Thread Christopher Swingley
Sundar, * Sundar Dorai-Raj [EMAIL PROTECTED] [2006-Feb-23 14:23 AKST]: Hi, Chris, x - data.frame(1:5, 6:10) names(x) - c(R, 2B) x R 2B 1 1 6 2 2 7 3 3 8 4 4 9 5 5 10 x$2B Thanks. I swear I tried just about every other combination of possible escape character. But I

Re: [R] Ranking within factor subgroups

2006-02-23 Thread maneesh deshpande
Hi Peter, That did the trick. Thank you very much. Regards, Maneesh From: Peter Dalgaard [EMAIL PROTECTED] To: maneesh deshpande [EMAIL PROTECTED] CC: [EMAIL PROTECTED], r-help@stat.math.ethz.ch Subject: Re: [R] Ranking within factor subgroups Date: 23 Feb 2006 07:28:13 +0100 maneesh

[R] converting character matrix to a dataframe

2006-02-23 Thread John M. Miyamoto
Dear R-Help, Suppose I have a character matrix, e.g., (ch.mat - matrix(c('a','s','*','f','w','*','k','*','*','f','i','o'), ncol=3)) When I convert 'ch.mat' to a dataframe, the columns are converted to factors: (d1 - data.frame(ch.mat)) mode(d1[,1]) is.factor(d1[,1]) To prevent this, I

Re: [R] converting character matrix to a dataframe

2006-02-23 Thread Gabor Grothendieck
You could do it directly like this: structure(split(ch.mat, col(ch.mat)), row.names = 1:nrow(ch.mat), .Names = 1:ncol(ch.mat), class = data.frame) On 2/23/06, John M. Miyamoto [EMAIL PROTECTED] wrote: Dear R-Help, Suppose I have a character matrix, e.g., (ch.mat -

[R] setMethod and contains not saving

2006-02-23 Thread Joseph Wang
Sorry if this is a duplicate I'm having the following problem saving methods which are subclasses of other objects. Is there a workaround. The problem is that the R file that triggers this bug is several meg, and I'd like to load from a RData file. This works setClass('foo') [1] foo

[R] importing data from BUGS format to R?

2006-02-23 Thread Jeffrey Moore
For those who use WinBUGS (or for those who are just familar with this format), I have a text file that looks like this (which is how R would export data if you used the structure function): y= structure(.Data= c(-6.93310E+01, 4.32870E+01, -6.96600E+01, 4.35730E+01, -6.90150E+01, 4.35870E+01,

Re: [R] importing data from BUGS format to R?

2006-02-23 Thread Gabor Grothendieck
Just source the file: source(mywinbugsfile.R) head(y) On 2/23/06, Jeffrey Moore [EMAIL PROTECTED] wrote: For those who use WinBUGS (or for those who are just familar with this format), I have a text file that looks like this (which is how R would export data if you used the structure

[R] Graybill-Bowden confidence band

2006-02-23 Thread Will Terry
Hi R folks, Anyone know how I can compute the alpha significance point for a distribution described as the maximum absolute value of k Student t- variables, each based on v degrees of freedom and having a common pairwise correlation coefficient rho? In my case rho is known to be 0. Or, more

[R] Error In RBloomberg

2006-02-23 Thread Samik Sen
Hello R-Expert, Recently I was using RBloomberg package in R-2.2.0 in Windows (XP) machine installing the required packages. I checked one example using blpGetData guided in corresponding help file: conn - blpConnect() edb - blpGetData(conn, ED1 Comdty, PX_LAST, start=chron(1/1/06),

[R] Help with barplot

2006-02-23 Thread matgopa1
Hello all, I need to create a horizontal barplot with the following data: City Median Springfield 34 Worcester 66 Fitchburg 65 Lowell 63 Quincy 62 Boston 36 Cambridge54 Waltham 42 Medford 52 Pittsfield 65 Rensselaer 60 Schenectady

Re: [R] Help with barplot

2006-02-23 Thread Jacques VESLOT
par(mar=par()$mar+c(0,3,0,0)) with(x, barplot(structure(Median, names=as.character(City)),horiz=T,las=2)) [EMAIL PROTECTED] a écrit : Hello all, I need to create a horizontal barplot with the following data: City Median Springfield 34 Worcester 66 Fitchburg 65 Lowell

[R] read table problem

2006-02-23 Thread Chua Tock Hing
Hi I have a file saved in R, named agrexp.Rdata, shown below agrdata fert yield 1 2584 2 5080 3 7590 4 100 154 5 125 148 If I double clicked on this file, the data is displayed without problem. However if I tried to import using:

Re: [R] does multinomial logistic model from multinom (nnet) has logLik?

2006-02-23 Thread Prof Brian Ripley
Please note, I told you that the deviance was minus twice log-likelihood unless summ 0. I had not checked the latter case, where it is not obvious, but I did not say it was invalid. In fact the answer is to be found on p.203 of MASS4 (we do ask people to read the supporting documentation),

Re: [R] converting character matrix to a dataframe

2006-02-23 Thread Prof Brian Ripley
It is a bit more efficient to use as.data.frame in your apply. You could make a copy of as.data.frame.matrix (under another name) and remove the special-casing of character matrices. This would efficiently give you a data frame with character columns, but they would then not be treated 'AsIs'

Re: [R] importing data from BUGS format to R?

2006-02-23 Thread Uwe Ligges
Gabor Grothendieck wrote: Just source the file: source(mywinbugsfile.R) head(y) ... and don't forget to transpose the matrix afterwards, if this was BUGS code. Uwe Ligges On 2/23/06, Jeffrey Moore [EMAIL PROTECTED] wrote: For those who use WinBUGS (or for those who are just

Re: [R] Error In RBloomberg

2006-02-23 Thread Prof Brian Ripley
Someone else at the same domain sent this earlier this week, so please do check before posting. See https://stat.ethz.ch/pipermail/r-help/2006-February/087382.html (which is not complete in the archive, but arrived here). Problems in packages should be reported to the maintainer. In this case