[R] Moving form Windows XP to Linux (Ubuntu 4 / debian)

2005-03-17 Thread Ale iberna
Hello! I am trying to move my work in R from Windows to Linux. However I am missing some of the functionality I was used to under Windows. I tried running R 2.0.1 by typing R in the terminal and via Emacs/ESS. R Gui currently does not work on my Linux. Currently one of my problems is: Under

Re: [R] Quantiles of data in a contingency table

2005-03-17 Thread Markus Jäntti
Matt Mohebbi wrote: Hello, I have data of the following form: data - data.frame(type=c(c,d,e), size=c(10,20,30), count=c(20,10,5)) data type size count 1c 1020 2d 2010 3e 30 5 I would like to compute the quantiles of size given the counts. For instance, in this

[R] Landscape indeces analysis methods as an R package!?

2005-03-17 Thread Sander Oom
Dear Barry, Thanks for your stimulating reply. As you see I have send a CC of this reply to the R mailing list. The R mailing list will be the best place to send your queries. You can subscribe here: http://www.r-project.org/mail.html I would think there is an interest in the provision of

Re: [R] Quantiles of data in a contingency table

2005-03-17 Thread Unung Istopo Hartanto
Try. median(rep(data$size, data$count)) thanks, regards, On Thu, 2005-03-17 at 14:42, Matt Mohebbi wrote: Hello, I have data of the following form: data - data.frame(type=c(c,d,e), size=c(10,20,30), count=c(20,10,5)) data type size count 1c 1020 2d 2010 3

[R] Compiling embedding R examples

2005-03-17 Thread Mauron Laurent (KETR 31)
Hi, I am working at a major financial institution and we would like to embed R in one of our front office application. The application is written in C/C++ so I started by trying to compile the examples in tests/Embedding of R 2.0.1. I have modified tests/Embedding/Makefile according

[R] [TEST] Do not read

2005-03-17 Thread Mauron Laurent (KETR 31)
test __ 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] kernlab sigest

2005-03-17 Thread bjoern h menze
hello, I have the following problem setting parameter 'frac' in the sigest function of the kernlab package. ## executing the ?sigest example: library(kernlab) data(spam) srange - sigest(type~.,data = spam) ## works fine... ## setting 'frac' explicitly ## (in this case even to the default of

[R] Question about hist

2005-03-17 Thread Eric Pellegrini
Hi all, here is my problem: I have a list (called rms) that contains for each of its element a different number of values. Based on that list, I generate an histogram for each of its elements using: histList - lapply(rms,hist,breaks=seq(0,4,0.1),plot=FALSE) that gives me a list of

Re: [R] Question about hist

2005-03-17 Thread Dimitris Rizopoulos
you mean something like this: lapply(histList, function(x) cumsum(x$counts)) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/336899 Fax:

[R] xyplot w/ panel.lmline solution

2005-03-17 Thread eesteves
Dear Sebastian Luque (and All R Users) With the following code I managed to plot different characters and regression lines for panels 2 (Day of year 101) and 4 (Days of year 151, 157 and 172): xyplot(log(no.larvae)~age.cls|factor(day),data=mortal, layout=c(7,1),aspect=5/3,

[R] error in solve_technical question

2005-03-17 Thread Jonathan Charrier
Hi everybody, it's a technical question . i have a matrix with 30 columns and 4 rows, i start my program and i found this error: error in solve.default(sBB + Z[,,i] %*% Gamma %*% t(Z[,,i])): system is computationally singular: reciprocal condition number = 7.6377e-018 is it R limit?

Re: [R] Moving form Windows XP to Linux (Ubuntu 4 / debian)

2005-03-17 Thread Prof Brian Ripley
On Thu, 17 Mar 2005, [windows-1250] Alea }iberna wrote: I am trying to move my work in R from Windows to Linux. However I am missing some of the functionality I was used to under Windows. I tried running R 2.0.1 by typing R in the terminal and via Emacs/ESS. R Gui currently does not work on my

Re: [R] Compiling embedding R examples

2005-03-17 Thread Prof Brian Ripley
Please read the posting guide and 1) Use the appropriate list, R-devel, and 2) Tell us enough about your environment, for example which OS this is. On Thu, 17 Mar 2005, Mauron Laurent (KETR 31) wrote: Hi, I am working at a major financial institution and we would like to embed R in one of our

Re: [R] kernlab sigest

2005-03-17 Thread Achim Zeileis
Bjoern, thanks for your mail. But when reporting problems with a contributed package, please contact the maintainer first or at least Cc him when writing to R-help. The problem below is in the formula method of sigest because the frac argument gets passed on to model.frame which causes the

Re: [R] Moving form Windows XP to Linux (Ubuntu 4 / debian)

2005-03-17 Thread Guillaume STORCHI
There's no real R user interface under linux, but it's not that better to have one...ESS/Emacs is pretty good! (you'll just get nervous when you'll want to save plots, look rplots up in goolge) *Try Rcmdr package, hope sci-views-R we'll be available soon for non-M$windoz OS *or have a

Re: [R] Re: Installing R on Mandrake 10.1

2005-03-17 Thread Michael Bibo
Christian christianmacaro at gmail.com writes: Dear all. First of all, thanks to Jon, Martin, Bogdan and Roland since they tried to help me. In order I tried to 1) install the libf2c0-3.4.1-4mdk.i586.rpm. 2) install R 2.0.1 from the source. 1) Didn't work, since the info is still

Re: [R] error in solve_technical question

2005-03-17 Thread Uwe Ligges
Jonathan Charrier wrote: Hi everybody, it's a technical question . i have a matrix with 30 columns and 4 rows, i start my program and i found this error: error in solve.default(sBB + Z[,,i] %*% Gamma %*% t(Z[,,i])): system is computationally singular: reciprocal condition number =

[R] Legend positioning in scaled survival plot

2005-03-17 Thread Rachel Pearce
I am sorry that this is another novice question. I am having trouble using legend with the survival curve plot from the survival package, and I wonder if it is because I have rescaled my plot. Here is the relevant segment of code: plot(survfit(Surv(OS,Status)~shortishcr1),main='Overall

RE: [R] Summing up matrices in a list

2005-03-17 Thread Adaikalavan Ramasamy
Yes, I was thinking of the trivial problem of 2 matrices. Nice to know I am not the only one who made the same error. Thanks to Thomas Lumley, John Fox, Dimitris Rizopoulos for pointing this out and many others for providing the correct solution. Regards, Adai On Wed, 2005-03-16 at 11:07

Re: [R] R equivalent to funcall?

2005-03-17 Thread Duncan Murdoch
On Thu, 17 Mar 2005 13:20:32 +0100 (CET), Johannes Hüsing [EMAIL PROTECTED] wrote : Dear all, I have a list of time series and want to plot them. Is there a way that the dot-dot-dot argument of a function accepts a list as single arguments, such as funcall in several Lisp dialects? do.call()

Re: [R] Legend positioning in scaled survival plot

2005-03-17 Thread Uwe Ligges
Rachel Pearce wrote: I am sorry that this is another novice question. I am having trouble using legend with the survival curve plot from the survival package, and I wonder if it is because I have rescaled my plot. Here is the relevant segment of code:

Re: [R] R equivalent to funcall?

2005-03-17 Thread Johannes Hüsing
On Thu, 17 Mar 2005 13:20:32 +0100 (CET), Johannes Hüsing [EMAIL PROTECTED] wrote : [...] Is there a way that the dot-dot-dot argument of a function accepts a list as single arguments, such as funcall in several Lisp dialects? do.call() comes close to what you want. [...] Indeed it does.

[R] Optimization of constrained linear least-squares problem

2005-03-17 Thread Stefaan Lhermitte
Dear R-ians, I want to perform an linear unmixing of image pixels in fractions of pure endmembers. Therefore I need to perform a constrained linear least-squares problem that looks like : min || Cx - d || ² where sum(x) = 1. I have a 3x3 matrix C, containing the values for endmembers and I have

Re: [R] question on xyplot

2005-03-17 Thread Adaikalavan Ramasamy
As promised here is my reply. I am assuming that your problem is changing the order of the xyplots by idno. The plotting order in lattice is determined by the levels of md$idno. By default it was reading the levels from top to bottom of the dataset as unique(md$idno) would do. library(nlme);

[R] problem with plot

2005-03-17 Thread Edouard Henrion
Dear list, I am using R.2.0.1 on a G5 biprocessor 2.5GHz with 2Go RAM (Mac OS X 10.3.8). I have some problems to use the plot function... it makes my R application crash ! Have someone any idea about this problem ??? Thanks, Edouard __

Re: [R] Adobe Reader V7.0 for Unix/Linux Available

2005-03-17 Thread Marc Schwartz
All, A couple of updates here: 1. According to a post on the Fedora lists this morning and an article at: http://www.heise.de/newsticker/meldung/57616 the version 7.0 Adobe Reader that I referenced in my original post is still a _Pre-Release_ version, NOT the final version. If accurate, it

Re: [R] Optimization of constrained linear least-squares problem

2005-03-17 Thread Dimitris Rizopoulos
you could re-parameterize, e.g., EM - c(4.5000,6.,10.5000,5.,27.,20.7500,16.7500,23.,38.7500) W - array(EM, c(3,3)) d - c(10, 20, 20) ##33 fn - function(x){ x - exp(x) / sum(exp(x)) r - W%*%x - d crossprod(r, r)[1,1] } opt - optim(rnorm(3), fn) res -

[R] how to close trellis.device?

2005-03-17 Thread Zhongming Yang
Dear All: I need draw some figure through trellis.device and save them as pdf files. How can I close trellis.device (something like dev.off() in nonlattice figure)? Many thanks Zhongming Yang - [[alternative HTML version deleted]]

Re: [R] how to close trellis.device?

2005-03-17 Thread Uwe Ligges
Zhongming Yang wrote: Dear All: I need draw some figure through trellis.device and save them as pdf files. How can I close trellis.device (something like dev.off() in nonlattice figure)? dev.off() is correct, because trellis.device also starts regular devices (with appropriate sttings). Uwe

Re: [R] problem with plot

2005-03-17 Thread Adaikalavan Ramasamy
We need more info to help you. What do you mean by crash, does it generate an error or something ? I presume you have just installed R. How did you install it ? If you did from source, did you do a make check ? I had this problem once and it was traced to a broken gcc version

[R] beginner question: how to sort out distinct values from a vector

2005-03-17 Thread Terry Mu
there is a vector, like: 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, I'd like a function that gives me only 1, 2, 3, 4, 5 thank you __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] beginner question: how to sort out distinct values from a vector

2005-03-17 Thread Chuck Cleland
?unique Terry Mu wrote: there is a vector, like: 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, I'd like a function that gives me only 1, 2, 3, 4, 5 thank you __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] beginner question: how to sort out distinct values from a vector

2005-03-17 Thread Marc Schwartz
On Thu, 2005-03-17 at 12:24 -0500, Terry Mu wrote: there is a vector, like: 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, I'd like a function that gives me only 1, 2, 3, 4, 5 See ?unique HTH, Marc SChwartz __ R-help@stat.math.ethz.ch mailing list

Re: [R] beginner question: how to sort out distinct values from a vector

2005-03-17 Thread Terry Mu
thank you so much! all of you! On Thu, 17 Mar 2005 11:30:10 -0600, Marc Schwartz [EMAIL PROTECTED] wrote: On Thu, 2005-03-17 at 12:24 -0500, Terry Mu wrote: there is a vector, like: 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, I'd like a function that gives me only 1, 2, 3, 4, 5 See ?unique

RE: [R] beginner question: how to sort out distinct values from a vector

2005-03-17 Thread Doran, Harold
You can use unique() -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Terry Mu Sent: Thursday, March 17, 2005 12:24 PM To: R-Help Subject: [R] beginner question: how to sort out distinct values from a vector there is a vector, like: 1, 1, 1, 2, 2, 3, 3,

Re: [R] beginner question: how to sort out distinct values from a vector

2005-03-17 Thread Uwe Ligges
Terry Mu wrote: there is a vector, like: 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, I'd like a function that gives me only 1, 2, 3, 4, 5 See ?unique Uwe Ligges thank you __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] Function match.call or saving all initial parameters

2005-03-17 Thread Ale iberna
Hello! I am interested, is it possible to get a call from the function (like with match.call), but in such a way that the call would include all elements to a function, not only those that were set in a call. What I want is to have also specified arguments that are not listed in the original call

[R] Links between R and Matlab

2005-03-17 Thread Garczarek, Ursula
Dear R-people, I am mainly programming in Matlab (version 7), both under Windows XP and under Suse Linux 9.0. Programs should run on both systems. I would like to use R-functions from within Matlab. So far, I did this by writing and reading ascii-files. Now I tried RMatlab, which I could not

[R] png device videos

2005-03-17 Thread javier garcia
Hi all; please, has anyone found a way to convert a series of png files created in an R script into a video (as avi), from within the same R script? I know this has little relation with typical R problems. Just because I've spent all day without finding a solution, and perhaps anyone has done

[R] Binding one column of characters into a dataframe factors other numeric columns

2005-03-17 Thread Ken Termiso
Hi all, I searched through the archives, but couldn't find a fix... Basically, I've got a bunch of numeric vectors and one character vector that I want to bind into a data frame. When I include the character vector as a column in the data frame, all the numeric columns get factored in the data

Re: [R] Binding one column of characters into a dataframe factors other numeric columns

2005-03-17 Thread Marc Schwartz
On Thu, 2005-03-17 at 18:30 +, Ken Termiso wrote: Hi all, I searched through the archives, but couldn't find a fix... Basically, I've got a bunch of numeric vectors and one character vector that I want to bind into a data frame. When I include the character vector as a column in the

Re: [R] png device videos

2005-03-17 Thread Marc Schwartz
On Thu, 2005-03-17 at 19:27 +0100, javier garcia wrote: Hi all; please, has anyone found a way to convert a series of png files created in an R script into a video (as avi), from within the same R script? I know this has little relation with typical R problems. Just because I've spent

[R] Line plot using xyplot function in lattice package

2005-03-17 Thread Ghosh, Sandeep
Hi All, For the following data when I use xyplot in package lattice the intervals are in the order of 2, 24, 8, but instead I want them to be in the order 2, 8, 24. Treatment Interval value A 2 0.448 A24 1.85 A 8

[R] Ideal Computer and Software (A bit off topic)

2005-03-17 Thread [EMAIL PROTECTED]
Hello everyone. This question might be a bit off topic, but I thought that (a) there couldn't be a better group to address my questions and (b) that others might find it useful too; It also might start an interesting discussion thread. I use R often for simulation purposes (which generally

Re: [R] how to close trellis.device?

2005-03-17 Thread Zhongming Yang
Thank you for your post. If I run: trellis.dev(pdf, filename=junk.pdf') plot(c(1:10)) dev.off() I get the correct junk.pdf. But when I try to draw some fancy stuff using xyplot(...), then I just get a junk.pdf of 4kb only, and abode says .. error, .. it has no page. If I remove dev.off(),

Re: [R] how to close trellis.device?

2005-03-17 Thread Zhongming Yang
You are right. ... print(xyplot(...)) ... solved the problem. Many thanks hadley wickham [EMAIL PROTECTED] wrote: Are you running them from a function? You probably want to check out 7.22 Why do lattice/trellis graphics not work? in the R faq. Hadley On Thu, 17 Mar 2005 11:37:53 -0800

Re: [R] Line plot using xyplot function in lattice package

2005-03-17 Thread Sundar Dorai-Raj
Ghosh, Sandeep wrote on 3/17/2005 1:25 PM: Hi All, For the following data when I use xyplot in package lattice the intervals are in the order of 2, 24, 8, but instead I want them to be in the order 2, 8, 24. Treatment Interval value A 2 0.448 A24

Re: [R] Line plot using xyplot function in lattice package

2005-03-17 Thread Sundar Dorai-Raj
Sundar Dorai-Raj wrote on 3/17/2005 2:27 PM: Ghosh, Sandeep wrote on 3/17/2005 1:25 PM: Hi All, For the following data when I use xyplot in package lattice the intervals are in the order of 2, 24, 8, but instead I want them to be in the order 2, 8, 24. Treatment Interval value A

[R] RODBC and portability issue

2005-03-17 Thread Depiereux Constant
Hello, New user of R I did experience some trouble using R and ODBC on Windows XP, MS Access and PostgreSQL. While querying a database is relatively simple, the use of sqlSave is a bit more tricky. After a large series of trial, I finally succeeded to get it work provided : 1. I leave the

[R] exact p-value for Spearman, with ties

2005-03-17 Thread Paul H Artes
Dear R, I'm looking for exact p-values for Spearman's rank correlation in the presence of ties. This is available in StatXact and SPSS, but I haven't yet found it in R. Has anyone implemented this? -- Paul H Artes Assist Prof, Ophth Vis Sci Dalhousie University, QEII Eye Care Centre Halifax,

[R] RMySQL for R 2.0.1

2005-03-17 Thread Fredrik Lundgren
Dear List, RMySQL is old and wouldn't install on R 2.0.1. How should the source be rewritten to be accepted by R 2.0.1. With thanks Fredrik Lundgren __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] short course - modeling in R

2005-03-17 Thread Peter C. Bruce
Dr. Phillip Good will offer his short course “Modeling in R” April 8 – April 29, 2005, online at statistics.com. This 3-week course will show you how to use R to create models for use in classification and prediction. You will be introduced to advanced graphing methods as needed. Modeling

Re: [R] RMySQL for R 2.0.1

2005-03-17 Thread David James
Fredrik Lundgren wrote: Dear List, RMySQL is old and wouldn't install on R 2.0.1. How should the source be rewritten to be accepted by R 2.0.1. With thanks Fredrik Lundgren __ R-help@stat.math.ethz.ch mailing list

Re: [R] exact p-value for Spearman, with ties

2005-03-17 Thread Peter Dalgaard
Paul H Artes [EMAIL PROTECTED] writes: Dear R, I'm looking for exact p-values for Spearman's rank correlation in the presence of ties. This is available in StatXact and SPSS, but I haven't yet found it in R. Has anyone implemented this? The algorithm used by those two (it's the same one --

[R] TD Matrix

2005-03-17 Thread Ryan Steckel
I'm trying to create a term document matrix where the columns are the documents, the rows are the terms in the documents, and the cells are a weight of term frequency in the document. My problem is the documents are all different lengths. So when I add a new document, if the document length is

[R] glm - poisson

2005-03-17 Thread Oli
Hello, I have a question on glm - poisson. I would like to fit a model on proportion of counts with some factors, and I decided to use glm - poisson because count data is essentially related to poisson. However, since I need to deal with proportion, and glm - poisson does not allow non-integer

Re: [R] R equivalent to funcall?

2005-03-17 Thread Duncan Murdoch
On Thu, 17 Mar 2005 15:11:50 +0100 (CET), Johannes Hüsing [EMAIL PROTECTED] wrote : On Thu, 17 Mar 2005 13:20:32 +0100 (CET), Johannes Hüsing [EMAIL PROTECTED] wrote : [...] Is there a way that the dot-dot-dot argument of a function accepts a list as single arguments, such as funcall in

RE: [R] TD Matrix

2005-03-17 Thread Huntsinger, Reid
Do you mean when you encounter a new term? I would think document *length* wouldn't matter; presumably you have a list of terms already. If so you could treat each document as a vector of term codes, then use tabulate to get the column for that document. If you're using all terms that appear in

[R] (no subject)

2005-03-17 Thread Brett Stansfield
I recently tried to make R highlight certain features in a scatterplot matrix pairs(sleep[c(SlowSleep, ParaSleep, logbrw, loglife, loggest, logbw)], * col=1+as.integer(ParaSleep 5.5)) this worked fine but when I wanted to add another condition i.e where another variable SlowSleep

[R] extract rows in dataframe with duplicated column values

2005-03-17 Thread Tiago R Magalhaes
Hi I want to extract all the rows in a data frame that have duplicates for a given column. I would expect this question to come up pretty often but I have researched the archives and surprisingly couldn't find anything. The best I can come up with is: x - data.frame(a=c(1,2,2,3,3,3), b=10)

[R] Constrained Nelder-Mead

2005-03-17 Thread Greg Tarpinian
All, In looking at `optim', it doesn't appear that it is possible to impose nonlinear constraints on Nelder- Mead. I am sufficiently motivated to try to code something in C from scratch and try to call it from R Does anyone have some good references to barrier and/or penalization methods

Re: [R] (no subject)

2005-03-17 Thread Sundar Dorai-Raj
Please use a meanful subject line! You want SlowSleep == 7.7, not SlowSleep = 7.7. Have you read the posting guide as others (including myself) have suggested? Have you also read An Introduction To R, which comes with all R distributions? --sundar Brett Stansfield wrote on 3/17/2005 8:09 PM: I

Re: [R] (no subject)

2005-03-17 Thread Sundar Dorai-Raj
Please use a meaningful subject line! You want SlowSleep == 7.7, not SlowSleep = 7.7. Have you read the posting guide as others (including myself) have suggested? Have you also read An Introduction To R, which comes with all R distributions? --sundar Brett Stansfield wrote on 3/17/2005 8:09 PM:

RE: [R] extract rows in dataframe with duplicated column values

2005-03-17 Thread Liaw, Andy
Does this work for you? x[table(x[,1]) 1,] a b 2 2 10 3 2 10 5 3 10 6 3 10 Andy From: Tiago R Magalhaes Hi I want to extract all the rows in a data frame that have duplicates for a given column. I would expect this question to come up pretty often but I have researched the

RE: [R] extract rows in dataframe with duplicated column values

2005-03-17 Thread Liaw, Andy
OK, strike one... Here's my second try: cnt - table(x[,1]) v - as.numeric(names(cnt[cnt 1])) v [1] 2 3 x[x[,1] %in% v, ] a b 2 2 10 3 2 10 4 3 10 5 3 10 6 3 10 Andy From: Liaw, Andy Does this work for you? x[table(x[,1]) 1,] a b 2 2 10 3 2 10 5 3 10 6 3 10 Andy

Re: [R] extract rows in dataframe with duplicated column values

2005-03-17 Thread Rob J Goedman
Tiago, Assuming the column in x is sorted: t = which(duplicated(x[, 1])) x[sort(union(t-1, t)),] or, if not sorted: t = which(duplicated(sort(x[, 1]))) x[sort(union(t-1, t)),] Rob On Mar 17, 2005, at 6:11 PM, Tiago R Magalhaes wrote: Hi I want to extract all the rows in a data frame that

RE: [R] extract rows in dataframe with duplicated column values

2005-03-17 Thread Marc Schwartz
Here's one more possibility: subset(x, a %in% a[duplicated(a)]) a b 2 2 10 3 2 10 4 3 10 5 3 10 6 3 10 HTH, Marc Schwartz On Thu, 2005-03-17 at 22:25 -0500, Liaw, Andy wrote: OK, strike one... Here's my second try: cnt - table(x[,1]) v - as.numeric(names(cnt[cnt 1])) v [1] 2

[R] logistic model cross validation resolved

2005-03-17 Thread Trevor Wiens
This post is NOT a question, but an answer. For readers please disregard all earlier posts by myself about this question. I'm posting for two reasons. First to say thanks, especially to Dimitris, for suggesting the use of errorest in the ipred library. Second, so that the solution to this