Re: [R] R sumo package suggestion

2004-11-12 Thread A.J. Rossini
Let them fail. Not all of the elisp code installed is self contained in the XEmacs bundles, but you won't use or know about them if you don't care. That's exactly what that snippet that I wrote before did -- ignored errors. best, -tony On Thu, 11 Nov 2004 15:59:09 -0500, Liaw, Andy [EMAIL

[R] Problems installing ncdf package into R

2004-11-12 Thread Dag . Steinskog
Hello Can someone please look into the problem with installing ncdf package into R. I get this message when I try install it: install.packages(ncdf) trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 22827 bytes opened

Re: [R] OLS error

2004-11-12 Thread Roger Bivand
On Thu, 11 Nov 2004, DrakeGis wrote: Thanks for the help. -I'm really sorry, but I'm affraid I can't publish any data in order to allow a reproduction of the results (enterprise policies :( ). The author of the Design package has already replied to this point. If the function only fails with

Re: [R] wrong answer for simple expressions

2004-11-12 Thread Petr Pikal
Hi On 11 Nov 2004 at 12:24, Drew Hoysak wrote: I am experiencing strange (to me) output when trying to do simple calculations. Expressions that should equal zero yield non-zero values. Examples: a - 4.1-3.1 b - 5.1-4.1 a-b [1] -4.440892e-16 (4.1-3.1)-(5.1-4.1) [1]

RE: [R] R sumo package suggestion

2004-11-12 Thread Philippe Grosjean
Hello, I think Achim suggestion is more realistic: it does not imply automatic installation of all packages, but just a restricted list of packages available on CRAN about a specific topic. An easy way to get this result is to propose separate lists of packages. It means separate lists than

Re: [R] R sumo package suggestion

2004-11-12 Thread Andrew Beckerman
One place to look, linked to the R development community, is the Bioconductor project where their GetBioC() function has package groupings (see http://www.bioconductor.org/getBioC.R) as an option. Perhaps, because of the specific focus of the Bioconductor suite, this is easier, but at

[R] How to get mode (the most frequent value in distribution)?

2004-11-12 Thread Gregor GORJANC
Hello! I have a continous distribution and would like to get mode (the most frequent value in distribution). I easily found mean, median and other basic thing but not mode function. Can anyone help? I know there my might be problems with multiple modes, but still I think that there should be

Re: [R] expressions and paste

2004-11-12 Thread asemeria
The existence of bold function in base R library is a news for me! I think that you have to read something about plotmath function (with it you can write latex-like expressions). Best. A.S. Alessandro Semeria Models and Simulations Laboratory Montecatini

[R] Simple operation on a subset of data

2004-11-12 Thread Giacomo De Giorgi
Sorry for the silly question. I am trying to perform a simple operation on a subsample of my data loaded as data and attached: data-read.dta(name file) attach(data) Say x=1,2 and y=4,5 I want to summarize z only if x=1 y=4. I thought that the way to do that would be to write if((x=1)

[R] dyn.load problem

2004-11-12 Thread O. Neto
Hi R-Users I wrote 1 week ago asking about a message that appears when I try run dyn.load. I'm trying to do an example in C code from Writing R Extension to learn how to do it. I have R 2.0.0, Rtools, Perl and MinGW as describe in http://www.murdoch-sutherland.com/Rtools/ with path

Re: [R] Simple operation on a subset of data

2004-11-12 Thread Dimitris Rizopoulos
Hi Giacomo, An Introduction to R is very useful document for all these things! Look at ?subset and try: dat - data.frame(x=sample(1:2, 10, TRUE), y=sample(c(4,5), 10, TRUE), z=rnorm(10)) ## summary(dat$z) summary(subset(dat, x==1 y==4, select=z)) I hope it helps. Best, Dimitris

Re: [R] Problems installing ncdf package into R

2004-11-12 Thread Roger D. Peng
Did you look at http://cran.us.r-project.org/bin/windows/contrib/2.0/ReadMe ? -roger [EMAIL PROTECTED] wrote: Hello Can someone please look into the problem with installing ncdf package into R. I get this message when I try install it: install.packages(ncdf) trying URL

Re: [R] How to get mode (the most frequent value in distribution)?

2004-11-12 Thread Petr Pikal
__ [EMAIL PROTECTED] 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] Re: How to get mode (the most frequent value in distribution)?

2004-11-12 Thread Vito Ricci
Hi Gregor, if you have a continous distribution is rather difficult that the same value is repeated many times. In this case I believe you could not find the mode (the most frequent value in distribution) as your distribution is continous, but only the modal class/interval (the interval of the

RE: [R] How to get mode (the most frequent value in distribution) ?

2004-11-12 Thread Liaw, Andy
A sample from a continuous distribution most likely has no meaningful sample mode. Shown below is a way to estimate the location of mode from a kernel density estimate (using the locfit package): x - rnorm(50) library(locfit) Locfit for R. August 3, 2000. (Updated for R 1.7.0, March 21, 2003)

[R] How to get mode in case of discrete or categorial data

2004-11-12 Thread Vito Ricci
Dear all, in a previuos message was asked how get the mode of continous distribution. Now I'm asking if there an R function to obtain the mode in case of a discrete distribution or categorial data. The only way is to use table(): x-rep(1:5,100) s-sample(x,40) t-table(s) t s 1 2 3 4 5

RE: [R] How to get mode in case of discrete or categorial data

2004-11-12 Thread John Fox
Dear Vito, How about names(t)[t == max(t)], which will pick up multiple modes if there's a tie. By the way, I recall a discussion of this question on r-help not too long ago. I hope this helps, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

RE: [R] an off-topic question - model validation

2004-11-12 Thread bogdan romocea
Assuming you have enough data, usually 1/4 to 1/2 is used for validation. One reference would be Picard, R.R. and Berk, K.N. (1990) Data Splitting, The American Statistician, 44;140-147. hth, b. -Original Message- From: Wensui Liu [mailto:[EMAIL PROTECTED] Sent: Thursday, November 11,

RE: [R] R sumo package suggestion

2004-11-12 Thread Pfaff, Bernhard
Dear list member, sorry, for jumping in this thread and/or the gun. What springs immediately to my mind is: if such a functionality should be realised, it might be beneficial too to have something similar to Thomas Ruedas `texdocTK' at hand; i.e. the retrieval of the pdf-package documentations

[R] whether R can import netcdf file format data ?

2004-11-12 Thread Yogesh K. Tiwari
Hello R Users, Whether 'R' can import Netcdf format data files ?? Any package in 'R' that can help me on this front ?? Many thanks in advance, Regards, Yogesh -- === Yogesh K. Tiwari, Max-Planck Institute for Biogeochemistry, Postfach 10 01 64, D-07701 Jena,

[R] Mode in case of discrete or categorial data

2004-11-12 Thread Vito Ricci
Thanking John for his suggestion I build this function which get the mode of both categorial and discrete data. Mode-function(x){t-table(x) if (is.numeric(x)) as.numeric(names(t)[t == max(t)]) else (names(t)[t == max(t)]) } Any other improvement and suggestion will welcome. Best Vito s [1]

Re: [R] whether R can import netcdf file format data ?

2004-11-12 Thread Prof Brian Ripley
On Fri, 12 Nov 2004, Yogesh K. Tiwari wrote: Whether 'R' can import Netcdf format data files ?? It can read from and write to them, at least. Any package in 'R' that can help me on this front ?? Do look at the `R Data Import/Export' manual that ships with R (a recent version is needed), or the R

Re: [R] expressions and paste

2004-11-12 Thread asemeria
Emily, are you right your code work, but this one maybe work better for you : sd2 -1.882 measure - (g/L) direction - increase chem - quote(apoA[bold(1)]) plot(0,0) titletxt - substitute(paste(bold(per) , , bold(sd2), ,bold(measure), , bold(direction), ,,bold(in usual

RE: [R] Mode in case of discrete or categorial data

2004-11-12 Thread Liaw, Andy
You might want to do a bit to handle NAs, as table() excludes them by default. Also, you could write it a bit cleaner as: Mode - function(x) { tab - table(x) m - names(tab)[tab == max(tab)] if (is.numeric(x)) m - as.numeric(m) m } (Generally I try avoiding constructs like: if

Re: [R] Simple operation on a subset of data

2004-11-12 Thread Thomas Lumley
On Fri, 12 Nov 2004, Giacomo De Giorgi wrote: Say x=1,2 and y=4,5 I want to summarize z only if x=1 y=4. I thought that the way to do that would be to write if((x=1) (y=4)) summary(z) butwhen I do this the result I get is for the whole data (irrespective of the conditions imposed). Can anyone

RE: [R] Mode in case of discrete or categorial data

2004-11-12 Thread Prof Brian Ripley
On Fri, 12 Nov 2004, Liaw, Andy wrote: You might want to do a bit to handle NAs, as table() excludes them by default. Also, you could write it a bit cleaner as: Mode - function(x) { tab - table(x) m - names(tab)[tab == max(tab)] if (is.numeric(x)) m - as.numeric(m) m } (Generally I

Re: [R] Mode in case of discrete or categorial data

2004-11-12 Thread Thomas Lumley
On Fri, 12 Nov 2004, Vito Ricci wrote: Mode-function(x){t-table(x) if (is.numeric(x)) as.numeric(names(t)[t == max(t)]) else (names(t)[t == max(t)]) } Any other improvement and suggestion will welcome. which.max is design for finding the maximum, so names(t)[which.max(t)] -thomas

RE: [R] whether R can import netcdf file format data ?

2004-11-12 Thread Benjamin Lloyd-Hughes
I've been using the ncdf package for reading climate data (mostly, NCEP/NCAR and ECMWF reanalysis stuff). The package does what it says on the tin, but can become quite slow when working with large data sets (e.g. a stack of daily grids say 144x73 elements 1970-to date). Does anyone have any tips

Re: [R] email result as attachement

2004-11-12 Thread Martin Maechler
Ramzi == Ramzi TEMANNI [EMAIL PROTECTED] on Tue, 9 Nov 2004 12:55:50 +0100 writes: Ramzi Hi, I’d like to know if it's possible to mail a file Ramzi (image generated with R) in attachments a similar to Ramzi bug.report Thanks in advance. I don't understand what attachments a

Re: [R] RODBC POSIX Daylight Saving blues

2004-11-12 Thread Bernie McConnell
Many thanks for the responses about how to read datetimes into POSIXct which refer to straight GMT times without regard to Daylight Saving. To reiterate, I''m using R 2.0.0 on win2000. I have tried Gabor's suggestion,see below, which did not work for me. The fundamental setting (for me)

RE: [R] Mode in case of discrete or categorial data

2004-11-12 Thread John Fox
Dear Thomas, I believe that which.max() will report only the first maximum in case of ties [which is why I suggested the more awkward t == max(t)]. Regards, John John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4

Re: [R] How to get mode (the most frequent value in distribution)?

2004-11-12 Thread Gregor GORJANC
Thanks to all! It appears that mode calculation is not easy or simple at all. I understand that it is problematic when you have continous distribution, but there should still be some general function, as for median, mean, ... -- Lep pozdrav / With regards, Gregor GORJANC

RE: [R] Mode in case of discrete or categorial data

2004-11-12 Thread Liaw, Andy
From: Thomas Lumley On Fri, 12 Nov 2004, Vito Ricci wrote: Mode-function(x){t-table(x) if (is.numeric(x)) as.numeric(names(t)[t == max(t)]) else (names(t)[t == max(t)]) } Any other improvement and suggestion will welcome. which.max is design for finding the maximum, so

Re: [R] RODBC POSIX Daylight Saving blues

2004-11-12 Thread Duncan Murdoch
On Fri, 12 Nov 2004 16:27:41 +, Bernie McConnell [EMAIL PROTECTED] wrote : Many thanks for the responses about how to read datetimes into POSIXct which refer to straight GMT times without regard to Daylight Saving. To reiterate, I''m using R 2.0.0 on win2000. I have tried Gabor's

[R] Linux on PowerPC 970 (IBM BladeCenter JS20)

2004-11-12 Thread Teruhito Hosono
Hi, I'm just wondering if I can run R software on IBM BladeCenter JS20 PowerPC 970 based now. If it's not available, do you have any plan to port it for JS20? Both Red Hat Enterprise Linux AS3 and SUSE Linux Enterprise Server 8/9 are available on JS20. Thanks.

[R] Firefox keyword searches for R S-Plus

2004-11-12 Thread kwright
If you've 'rediscovered the web' with Firefox (http://getfirefox.com), you might find this tip handy. Suppose you want to search the (local) R documentation for information about the lme function. Wouldn't it be nice to just type into the browser address bar: r lme and have the search

Re: [R] Linux on PowerPC 970 (IBM BladeCenter JS20)

2004-11-12 Thread Peter Dalgaard
Teruhito Hosono [EMAIL PROTECTED] writes: Hi, I'm just wondering if I can run R software on IBM BladeCenter JS20 PowerPC 970 based now. If it's not available, do you have any plan to port it for JS20? Both Red Hat Enterprise Linux AS3 and SUSE Linux Enterprise Server 8/9 are available on

[R] R on 64-bit Linux machine

2004-11-12 Thread Vadim Ogranovich
Hi, We are planning to buy a 64-bit Linux machine which will mainly run R. There was an interesting thread on 64-bits on r-help back in April that basically confirmed that the 64-bit R is fine as long as the length of an atomic object is less than 2^31 - 1. My specific question is on which

[R] Design Matrix

2004-11-12 Thread xhuil102
Dear all, I need some help on matrix design and B statistics by using limma package. I want to compare gene expression in 2 groups of cDNA samples. The experiment compares 4 treated mice(#1,#2,#3,#4) and 4 control mice (#5,#6,#7,#8). The target file is FileName Cy3 Cy5 mice1.spot

Re: [R] R on 64-bit Linux machine

2004-11-12 Thread Roger D. Peng
I've built (and routinely use) 64 bit R on the following platforms: Red Hat Enterprise Linux AS release 3 (AMD Opteron 848) Fedora Core 2 x86_64 (AMD Athlon 64 3800+) SuSE SLES 8 (AMD Opteron 248) One problem that has come up is that if you want to link R with ATLAS, you need to build shared

Re: [R] R on 64-bit Linux machine

2004-11-12 Thread Prof Brian Ripley
On Fri, 12 Nov 2004, Vadim Ogranovich wrote: Hi, We are planning to buy a 64-bit Linux machine which will mainly run R. There was an interesting thread on 64-bits on r-help back in April that basically confirmed that the 64-bit R is fine as long as the length of an atomic object is less than 2^31

RE: [R] R on 64-bit Linux machine

2004-11-12 Thread Liaw, Andy
We've had good experience so far with the threaded Goto BLAS (on Opteron 244/248/250, SLES8). Has anyone tried building R with supposedly more optimized compilers (PGI, EKO, etc.)? If so, how do they stack up against GCC? Best, Andy From: Roger D. Peng I've built (and routinely use) 64

Re: [R] R on 64-bit Linux machine

2004-11-12 Thread Prof Brian Ripley
On Fri, 12 Nov 2004, Roger D. Peng wrote: I've built (and routinely use) 64 bit R on the following platforms: Red Hat Enterprise Linux AS release 3 (AMD Opteron 848) Fedora Core 2 x86_64 (AMD Athlon 64 3800+) SuSE SLES 8 (AMD Opteron 248) One problem that has come up is that if you want to link R

Re: [R] Firefox keyword searches for R S-Plus

2004-11-12 Thread Romain François
Hello Kevin, That's a good idea to use the functionnality of firefox to search for help in R. I wonder if that is possible to perform the search in the searchplugins (like google), I tried to but there is always the characters %20= that messed up with the one I was actually looking at. Maybe

Re: [R] R on 64-bit Linux machine

2004-11-12 Thread Peter Dalgaard
Roger D. Peng [EMAIL PROTECTED] writes: I've built (and routinely use) 64 bit R on the following platforms: Red Hat Enterprise Linux AS release 3 (AMD Opteron 848) Fedora Core 2 x86_64 (AMD Athlon 64 3800+) SuSE SLES 8 (AMD Opteron 248) Nice to know about the Enterprise variants. FC2/3 and

Re: [R] R on 64-bit Linux machine

2004-11-12 Thread Peter Dalgaard
Prof Brian Ripley [EMAIL PROTECTED] writes: ATLAS, you need to build shared ATLAS libraries (rather than static). This requires some modifications to the configuation files for ATLAS. But my experience shows that R itself builds out of the box on these systems. However, you will

[R] Stat. Computing 2005 Chambers Award competition

2004-11-12 Thread jose . pinheiro
The Statistical Computing Section of the American Statistical Association announces the competition for the John M. Chambers Statistical Software Award. In 1998 the Association for Computing Machinery presented its Software System Award to John Chambers for the design and development of S. Dr.

Re: [R] Firefox keyword searches for R S-Plus

2004-11-12 Thread kwright
Nice idea. A couple of comments. 1. I personally always install R in c:/R/ instead of c:/Program Files/ There are frequently comments on R-help that it is better to avoid paths with spaces. Still, you should be able to use /Progra~1/ instead of /Program Files/ 2. The search engine plugin that

[R] Variance and Covariance Matrix D and R in nlme or lme4.

2004-11-12 Thread Alexandre Galvão Patriota
Hi, How extract the Variance and Covariance Matrices D of random effects and R of error in the lme object? Thanks in advance. Alexandre Galvão __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] Variance and Covariance Matrix D and R in nlme or lme4 part II

2004-11-12 Thread Alexandre Galvão Patriota
The model is Y = XB + Zg + e where g~N(0, D) e~N(0, R) How to extract the VAR(g)= D, VAR(e)=R and V=ZDZ'+R? thanks __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] density estimation: compute sum(value * probability) for given distribution

2004-11-12 Thread bogdan romocea
Dear R users, This is a KDE beginner's question. I have this distribution: length(cap) [1] 200 summary(cap) Min. 1st Qu. MedianMean 3rd Qu.Max. 459.9 802.3 991.6 1066.0 1242.0 2382.0 I need to compute the sum of the values times their probability of occurence. The graph

[R] unavoidable loop? a better way??

2004-11-12 Thread James Muller
Hi all, I have the following problem, best expressed by my present solution: # p is a vector myfunc - function (p) { x[1] - p[1] for (i in c(2:length(p))) { x[i] - 0.8*p[i] + 0.2*p[i-1] } return (x) } That is, I'm calculating a time-weighted average. Unfortunately the scale of the

Re: [R] unavoidable loop? a better way??

2004-11-12 Thread Murad Nayal
__ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] unavoidable loop? a better way??

2004-11-12 Thread James Muller
I am very sorry. I've made a typo. The function should be: # p is a vector myfunc - function (p) { x[1] - p[1] for (i in c(2:length(p))) { x[i] - 0.8*p[i] + 0.2*x[i-1] } return (x) } James __ [EMAIL PROTECTED] mailing list

[Fwd: Re: [R] unavoidable loop? a better way??]

2004-11-12 Thread Murad Nayal
__ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] unavoidable loop? a better way??

2004-11-12 Thread Deepayan Sarkar
On Saturday 13 November 2004 00:51, James Muller wrote: Hi all, I have the following problem, best expressed by my present solution: # p is a vector myfunc - function (p) { x[1] - p[1] for (i in c(2:length(p))) { x[i] - 0.8*p[i] + 0.2*p[i-1] } return (x) } Does this

Re: [R] unavoidable loop? a better way??

2004-11-12 Thread James Muller
Take 3: # p is a vector myfunc - function (p) { x - rep(0,length(p)) x[1] - p[1] for (i in c(2:length(p))) { x[i] - 0.8*p[i] + 0.2*x[i-1] # note the x in the last term } return (x) } James On Sat, 13 Nov 2004 01:12:50 -0600, Deepayan Sarkar [EMAIL PROTECTED] wrote: On