Re: [R] PDF version of Chinese translations of the manual An Introduction to R

2006-07-12 Thread ronggui
That's a great news for all Chinese useR. 2006/7/12, Guohui Ding [EMAIL PROTECTED]: Dear All, I distributed the HTML style one year ago ( http://www.biosino.org/pages/newhtm/r/schtml and http://www.biosino.org/pages/newhtm/r/tchtml ). Now I polished it, and rewrote it with Latex. You

[R] plot.ts panel function

2006-07-12 Thread Matthias Braeunig
How can I set the ylim in individual panels of a multiple plot.ts? The panels are all scaled to fully fit the series inside. But I need specific scales, and colors Here is an example: plot.ts(cbind(1:10,1:10/10),ylim=c(0,3))# ylim has no effect Can someone more knowledgable please

[R] Access to conditioning values in xyplot

2006-07-12 Thread Jean-Marc Ottorini
Dear all, I have already searched unsuccessfully a lengthy R documentation, the archives of the list, and the Internet for a solution to this problem... Could anybody, please, have a look at it? The following lattice graphics works well: residus - xyplot (n ~ cg | di, data = myData,

Re: [R] plot.ts panel function

2006-07-12 Thread Dieter Menne
Matthias Braeunig mb.atelier at web.de writes: How can I set the ylim in individual panels of a multiple plot.ts? The panels are all scaled to fully fit the series inside. But I need specific scales, and colors Here is an example: plot.ts(cbind(1:10,1:10/10),ylim=c(0,3)) #

Re: [R] plot.ts panel function

2006-07-12 Thread Gabor Grothendieck
If you convert the ts object to a zoo object then it will invoke plot.zoo in which case ylim= will work: library(zoo) x - cbind(1:10,1:10/10) plot(zoo(x), ylim = c(0,3)) On 7/12/06, Matthias Braeunig [EMAIL PROTECTED] wrote: How can I set the ylim in individual panels of a multiple plot.ts?

[R] Discretize data.frame

2006-07-12 Thread Andrej Kastrin
Dear useRs, I use dics.ef function from dprep package to discretize continuous variable using intervals of equal frequencies. Dataset to be discretized include 4 continuous and 2 discrete variables in the following order: Continuous Countinuous Countinuous Discrete Discrete Continuous The

[R] legend outside plotting area

2006-07-12 Thread Georg Otto
Hi, I would like to place a legend outside a plotting area. Could anybody give me a hint how this is done? Cheers, Georg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] legend outside plotting area

2006-07-12 Thread Joris De Wolf
see http://finzi.psych.upenn.edu/R/Rhelp02a/archive/68585.html Georg Otto wrote: Hi, I would like to place a legend outside a plotting area. Could anybody give me a hint how this is done? Cheers, Georg __ R-help@stat.math.ethz.ch mailing

[R] Are infix binary operators ** and ^ aliased?

2006-07-12 Thread Jean lobry
Dear R-help, After making a typo (reminiscent of FORTRAN 77, I guess) I found the following: identical(all.equal(2^(-10:10), 2**(-10:10)), TRUE) [1] TRUE I have tried to find the documentation about the ** operator but I was unsuccesful this way: sessionInfo() Version 2.3.1 (2006-06-01)

Re: [R] Are infix binary operators ** and ^ aliased?

2006-07-12 Thread Gabor Grothendieck
It appears so. If we define ^ for class x then ** seems to change in the same way: ^.x - function(x,y) x+y y - structure(3, class = x) y ** 4 [1] 7 attr(,class) [1] x On 7/12/06, Jean lobry [EMAIL PROTECTED] wrote: Dear R-help, After making a typo (reminiscent of FORTRAN 77, I guess) I

Re: [R] Are infix binary operators ** and ^ aliased?

2006-07-12 Thread Peter Dalgaard
Jean lobry [EMAIL PROTECTED] writes: Dear R-help, After making a typo (reminiscent of FORTRAN 77, I guess) I found the following: identical(all.equal(2^(-10:10), 2**(-10:10)), TRUE) [1] TRUE I have tried to find the documentation about the ** operator but I was unsuccesful this

[R] Query : Modification of graphs

2006-07-12 Thread priti desai
How to change the background in the plots The e.g. for which I am working is as follows, The R script is ###start### amounts - c(21790,5669,34921.17,60152.47,47228.61,16566.13,8283,3980,5445,1000,125

Re: [R] detach

2006-07-12 Thread Gabor Grothendieck
Just wanted to add that entering this into a fresh session does not help. Note that as.Date.numeric is still defined after unloading the namespace: as.Date(1) Error in as.Date.default(1) : do not know how to convert '1' to class Date library(zoo) as.Date(1) [1] 1970-01-02

[R] Is it possible to only read a subset by read.table ?

2006-07-12 Thread David Vonka
Hello, is it possible to do something like DATA - read.table(file=blabla.dat,subset=(sex==male)), i.e. make R read only a subset of a csv file ? I think it would be useful in case of very big datasets, but I can't find such a feature. Thanks for an answer, David Vonka

Re: [R] Is it possible to only read a subset by read.table ?

2006-07-12 Thread Gabor Grothendieck
You can use pipe with read.table as in: http://tolstoy.newcastle.edu.au/R/help/06/02/20379.html Also note skip= and nrows= arguments to read.table. On 7/12/06, David Vonka [EMAIL PROTECTED] wrote: Hello, is it possible to do something like DATA -

[R] ts command and stl function

2006-07-12 Thread d d [EMAIL PROTECTED] ac uk
Hi, I have imported a csv file into R which contains one column (the rate er 100,000 population of a disease, by month over 11 years) I coerced into a time series using the following function, tstkr-ts(tkr,deltat=1/12) This seems to work fine, and when I check for the class of the object

Re: [R] Is it possible to only read a subset by read.table ?

2006-07-12 Thread Roger Peng
It's not so straightforward as that, but you could construct something with readLines(). -roger On 7/12/06, David Vonka [EMAIL PROTECTED] wrote: Hello, is it possible to do something like DATA - read.table(file=blabla.dat,subset=(sex==male)), i.e. make R read only a subset of a csv file ?

Re: [R] detach

2006-07-12 Thread Roger Peng
I believe (3) should always work as long as zoo has a namespace. The ':::' operator will load the namespace of the package but will not attach it to the search list. -roger On 7/11/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: We try the following: search() as.Date(1)

Re: [R] detach

2006-07-12 Thread Gabor Grothendieck
Note that even this entered into a fresh session exhibits this behavior. There is no use of ::: here: as.Date(1) Error in as.Date.default(1) : do not know how to convert '1' to class Date library(zoo) as.Date(1) [1] 1970-01-02 unloadNamespace(zoo) environment: namespace:zoo as.Date(1) [1]

[R] Error install rgl package on linux

2006-07-12 Thread Muhammad Subianto
Dear all, I tried to install rgl package on my linux machine fc5, I got an error. Here I run R as user, $ R options(repos=c(CRAN=http://cran.at.r-project.org/;)) install.packages(rgl, lib=/home/subianto/local/lib/R/library/site-packages, dependencies=TRUE) trying URL

[R] ts and stl functions

2006-07-12 Thread Daniel sutcliffe
Hi, I have imported a csv file into R which contains one column (the rate er 100,000 population of a disease, by month over 11 years) I coerced into a time series using the following function, tstkr-ts(tkr,deltat=1/12) This seems to work fine, and when I check for the class of the object

Re: [R] Is it possible to only read a subset by read.table ?

2006-07-12 Thread Prof Brian Ripley
On Wed, 12 Jul 2006, David Vonka wrote: Hello, is it possible to do something like DATA - read.table(file=blabla.dat,subset=(sex==male)), i.e. make R read only a subset of a csv file ? I think it would be useful in case of very big datasets, but I can't find such a feature. No. It

[R] AICc vs AIC for model selection

2006-07-12 Thread Sachin J
Hi, I am using 'best.arima' function from forecast package to obtain point forecast for a time series data set. The documentation says it utilizes AIC value to select best ARIMA model. But in my case the sample size very small - 26 observations (demand data). Is it the right to use AIC

Re: [R] ts and stl functions

2006-07-12 Thread Prof Brian Ripley
On Wed, 12 Jul 2006, Daniel sutcliffe wrote: Hi, I have imported a csv file into R which contains one column (the rate er 100,000 population of a disease, by month over 11 years) I coerced into a time series using the following function, tstkr-ts(tkr,deltat=1/12) That's likely

[R] DTW - dynamic time warping - and time series in R

2006-07-12 Thread Ondrej Vyborny
Hello, can anybody tell me if there exists functions for DTW in R? I didn't find anything at CRAN's search page... Also any information about packages for time series preprocessing (for pattern matching) would be useful... Thanks a lot, ondra __

Re: [R] Error install rgl package on linux

2006-07-12 Thread Muhammad Subianto
On this day 12/07/2006 15:57, Peter Dalgaard wrote: Muhammad Subianto [EMAIL PROTECTED] writes: QuadSet.o RenderContext.o render.o rglview.o scene.o select.o Shape.o SphereMesh.o SphereSet.o SpriteSet.o String.o Surface.o TextSet.o Texture.o TriangleSet.o types.o Viewpoint.o win32gui.o

[R] clear window on Mac OS X

2006-07-12 Thread A.R. Criswell
Hello All, On Windows OS, one can clear previous results in the R window with CNTL-L. Is there a similar command in R for Mac OS X? Thanks __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Is it possible to only read a subset by read.table ?

2006-07-12 Thread bogdan romocea
It's possible and straightforward (just don't use R). IMHO the GNU Core Utilities http://www.gnu.org/software/coreutils/ plus a few other tools such as sed, awk, grep etc are much more appropriate than R for processing massive text files. (Get a good book about UNIX shell scripting. On Windows you

[R] Keep value lables with data frame manipulation

2006-07-12 Thread Jol, Arne
Dear R, I import data from spss into a R data.frame. On this rawdata I do some data processing (selection of observations, normalization, recoding of variables etc..). The result is stored in a new data.frame, however, in this new data.frame the value labels are lost. Example of what I do in

[R] Prediction interval of Y using BMA

2006-07-12 Thread Nicolas . Meyer
Hello everybody, In order to predict income for different time points, I fitted a linear model with polynomial effects using BMA (bicreg(...)). It works fine, the results are consistent with what we are looking for. Now, we would like to predict income for a future time point t_next and of

Re: [R] detach

2006-07-12 Thread Martyn Plummer
My guess is that even though the zoo namespace is unloaded. The S3 method as.Date.numeric is still registered, and the name space will be reloaded whenever it is dispatched. library(zoo) loadedNamespaces() [1] base graphics grDevices methods stats utils [7] zoo unloadNamespace(zoo)

Re: [R] detach

2006-07-12 Thread Prof Brian Ripley
On Wed, 12 Jul 2006, Martyn Plummer wrote: My guess is that even though the zoo namespace is unloaded. The S3 method as.Date.numeric is still registered, and the name space will be reloaded whenever it is dispatched. library(zoo) loadedNamespaces() [1] base graphics grDevices

Re: [R] Keep value lables with data frame manipulation

2006-07-12 Thread Marc Schwartz (via MN)
On Wed, 2006-07-12 at 17:41 +0100, Jol, Arne wrote: Dear R, I import data from spss into a R data.frame. On this rawdata I do some data processing (selection of observations, normalization, recoding of variables etc..). The result is stored in a new data.frame, however, in this new

Re: [R] detach

2006-07-12 Thread Gabor Grothendieck
Looks like one can do the following. Don't know if it would cause problems elsewhere. Note that after removing as.Date.numeric from the S3 Methods Table as.Date.numeric was no longer dispatched. as.Date(1) Error in as.Date.default(1) : do not know how to convert '1' to class Date library(zoo)

[R] saving intermediate graphics

2006-07-12 Thread Charles Annis, P.E.
Greetings, R-friends: I'm using R 2.3.1 on a DELL box with 2 gig, running WindowsXP Pro. I am making what is admittedly a very busy plot composed of qq plots with superimposed density() plots. I need to show everything and the result is messy, but informative. If I produce the basic qq plot,

Re: [R] saving intermediate graphics

2006-07-12 Thread Prof Brian Ripley
On Wed, 12 Jul 2006, Charles Annis, P.E. wrote: Greetings, R-friends: I'm using R 2.3.1 on a DELL box with 2 gig, running WindowsXP Pro. I am making what is admittedly a very busy plot composed of qq plots with superimposed density() plots. I need to show everything and the result is

Re: [R] R newbie: logical subsets

2006-07-12 Thread Greg Snow
Gabor, your solution does not take into account the groups. How about something like: iris2 - iris iris2$m - ave(iris2$Sepal.Length, iris2$Species) iris2$s - ave(iris2$Sepal.Length, iris2$Species, FUN=sd) iris2 - transform(iris2, z= (Sepal.Length-m)/s) iris2.2 - subset(iris2, abs(z) 2)

Re: [R] saving intermediate graphics

2006-07-12 Thread Charles Annis, P.E.
Wow! Exactly what I needed. Thank you, Professor Ripley! Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Prof Brian Ripley Sent:

[R] shapiro.test() output

2006-07-12 Thread Matthew.Findley
R Users: My question is probably more about elementary statistics than the mechanics of using R, but I've been dabbling in R (version 2.2.0) and used it recently to test some data . I have a relatively small set of observations (n = 12) of arsenic concentrations in background groundwater and

Re: [R] Is it possible to only read a subset by read.table ?

2006-07-12 Thread Steve Miller
You could also use Perl/Python/Ruby to pipe the data to R, e.g. msci - read.table(pipe(python /steve/python/msciintl.py),sep=,,header=T, as.is=T) This is a very reasonable way to exploit the data munging capabilities of the agile languages. Of course, better still is to query the data into R from

Re: [R] shapiro.test() output

2006-07-12 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: R Users: My question is probably more about elementary statistics than the mechanics of using R, but I've been dabbling in R (version 2.2.0) and used it recently to test some data . I have a relatively small set of observations (n = 12) of arsenic

[R] RODBC, missing values, and Excel

2006-07-12 Thread Sundar Dorai-Raj
Hi, all, I'm trying to use RODBC to read data from Excel. However, I'm having trouble converting missing values to NA and rather perplexed by the output. Below illustrates my problem: ## DATA - copy to Excel and save as tmp.xls ## tmp.xls!Sheet1 x 0.11 0.11 na na na 0.11 ## tmp.xls!Sheet2 x

[R] adaptive knot placement for splines

2006-07-12 Thread Simon Lin
Are there any R implementation of adaptive knot placement? No need to be fancy. Something like stepwise selection by Friedman and Silverman (1989)? The implementation in polyspline is too specific for lognormal distributions. Thanks! Simon [[alternative HTML version deleted]]

Re: [R] shapiro.test() output

2006-07-12 Thread Michael Grant
Matthew, You may find the following documents useful if your venture into environmental statistics is serious. First, the 92 EPA Addendum on GW statistics--links at http://www.epa.gov/correctiveaction/resource/guidance/sitechar/gwstats/gwstats.htm The second is Helsel's book at the USGS

Re: [R] adaptive knot placement for splines

2006-07-12 Thread Liaw, Andy
Not TURBO, but BRUTO (bruto() in the mda package) proposed in the discussion of that paper, or even MARS (mars(), also in mda). Andy From: Simon Lin Are there any R implementation of adaptive knot placement? No need to be fancy. Something like stepwise selection by Friedman and Silverman

Re: [R] RODBC, missing values, and Excel

2006-07-12 Thread Gabor Grothendieck
I also got a strange result too (I renamed it sdr.read.xls to distinguish it from read.xls in gdata and noticed that a space got into my na's somehow so I used na for my na.strings: sdr.read.xls(/test.xls, Sheet2, na.strings = na ) x 1 NA 2 NA 3 na 4 na 5 na 6 na 7 NA I had more

[R] question about cross-validation for mutivariate linear regression

2006-07-12 Thread jz7
Dear all, I am trying to do a standard mutivariate linear regression for my training set, and want to perform leave-one-out cross-validation to see how well the model is. I found several CV in R, such as cv.lm in DAAG, cv.glm in boot, and crossval in bootstrap. Which one should I use? And how can

Re: [R] RODBC, missing values, and Excel

2006-07-12 Thread Sundar Dorai-Raj
Hi, Gabor, Thanks for the reply. Perhaps Prof. Ripley will enlighten us as he is the RODBC maintainer. Unfortunately, gdata::read.xls will not work for me (at least I don't think it will) because I need to refer to each worksheet by name and not by number. For example, I need extract data

Re: [R] RODBC, missing values, and Excel

2006-07-12 Thread Gabor Grothendieck
Would it be good enough to just read all the sheets in? The perl program can do that and although the read.xls R function does not interface to that aspect of its functionality its not that difficult to access it yourself. Assume your excel file is in \test.xls . Just switch to that folder.

Re: [R] RODBC, missing values, and Excel

2006-07-12 Thread Gabor Grothendieck
In thinking about this some more I have a better idea. Use rcom (or RDCOMClient) to get a list of the sheet names and then use that to determine which sheet you need. Then use read.xls to get it like this assuming that the Excel file and path are C:\test.xls and that one of the sheets in that

[R] writing R output to a specific file type

2006-07-12 Thread Eric C. Jennings
Is it possible to write R-output to a specific file type? Specifically is it possible to write to a specific cell in an MS Excel spreadsheet? Thanks, Eric __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Misunderstanding with lines (or elsewhere)

2006-07-12 Thread vincent
Thanks for the hints. __ 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

Re: [R] writing R output to a specific file type

2006-07-12 Thread Gabor Grothendieck
See: http://tolstoy.newcastle.edu.au/R/help/05/07/8950.html On 7/12/06, Eric C. Jennings [EMAIL PROTECTED] wrote: Is it possible to write R-output to a specific file type? Specifically is it possible to write to a specific cell in an MS Excel spreadsheet? Thanks, Eric