[R] Why does summary does not produce output?

2004-07-05 Thread Jozef De Herdt
Hello, I'm a starting user of R. I have installed R 1.9.1 and winedt 5.4 If I run the example from written with winedt. The summary command does not produce any output. It does when I repeat the command manualy in R. Can someone explain me what can be the problem? library(MASS)

[R] help changing the size of labels in a dendrogram plot

2004-07-05 Thread Joy, Tom
I am having trouble changing the size of labels when plotting a dendrogram created from hclust, I want to do it this way so I can use the 'horiz=TRUE' option in a dendrogram plot and rotate my chart. Can anyone help either to tell my how to rotate a plot of an hclust object or to change the

Re: [R] Why does summary does not produce output?

2004-07-05 Thread Peter Dalgaard
Jozef De Herdt [EMAIL PROTECTED] writes: If I run the example from written with winedt. The summary command does not produce any output. It does when I repeat the command manualy in R. Can someone explain me what can be the problem? library(MASS) data(anorexia) anorex.1 -

[R] general questions about R on debian/powerpc

2004-07-05 Thread Tamas Papp
Hi, I am about to but a laptop, and have narrowed the choices down to a Dell Latitude 600 and an Apple Powerbook G4 Aluminium (Princeton provides these models at a discount for grad students). I am biased towards the Powerbook, and would like to run Debian on it. I have only used debian on i386

Re: [R] hclust plotting

2004-07-05 Thread Martin Maechler
Rafael == Rafael A Irizarry [EMAIL PROTECTED] on Fri, 2 Jul 2004 15:50:46 -0400 (EDT) writes: Rafael im using plclust and want the labels to be different Rafael colors. i took a look at Rafael getS3method(plot,hclust) and saw a call to Rafael .Internal. i looked at the help

[R] replacing values in a matrix or data.frame

2004-07-05 Thread assuncao . senra
Hi, I have a matrix where I want to replace the entries of each column by the proportion value of the times each entrie appears in that column, that is, In each column there 4 to 10 repeated values, for wich i can compute frequencies in the respective column, and then i want to replace each

Re: [R] general questions about R on debian/powerpc

2004-07-05 Thread A.J. Rossini
I ran Debian/PPC for about a year, 1-2 years ago -- it worked fine at that point, on a G3 iBook. Of course, you get weird looks with MacOS / Linux dual boots, but that's different than whether it functions. I switched back to intel-based hardware because it was cheaper and faster, not

[R] What is a sane way to deal with changes in library loadings after 1.9.0?

2004-07-05 Thread a . prioglio
Hi, perhaps this is again a silly question ... As I am using R on different machines, some are version 1.8.1 and some 1.9.1. One of the changes between these versions is the change in default libraries loaded when reading scripts. So I started my scripts with: if (R.version$minor=9.0) {

Re: [R] replacing values in a matrix or data.frame

2004-07-05 Thread Dimitris Rizopoulos
Hi, you could try something like this, x - matrix(sample(1:10,25, rep=TRUE), 5 ,5) x apply(x, 2, function(y){ a - table(y) rep(a/sum(a), a) }) I hope this helps. Best, Dimitris Dimitris Rizopoulos Doctoral Student Biostatistical Centre School of Public Health Catholic University of

Re: [R] What is a sane way to deal with changes in library loadings after 1.9.0?

2004-07-05 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: Hi, perhaps this is again a silly question ... As I am using R on different machines, some are version 1.8.1 and some 1.9.1. One of the changes between these versions is the change in default libraries loaded when reading scripts. So I started my scripts

[R] Failing on reading a slightly big dataset

2004-07-05 Thread Ajay Shah
I have a file with 4 columns per line, all pipe delimited. $ wc -l cmie_firm_data.text 89325 cmie_firm_data.text $ ls -al cmie_firm_data.text -rw-r--r--1 ajayshah ajayshah 4415637 Jul 5 15:25 cmie_firm_data.text $ awk -F\| '(NF != 4)' cmie_firm_data.text $ head cmie_firm_data.text All

Re: [R] Failing on reading a slightly big dataset

2004-07-05 Thread Prof Brian Ripley
You are asking read.table to interpret both quote and comment characters in your file. You do seem to have quotes -- are they always matched? Please read through the Data Import/Export manual and check out all the options. On Mon, 5 Jul 2004, Ajay Shah wrote: I have a file with 4 columns per

RE: [R] Failing on reading a slightly big dataset

2004-07-05 Thread David Khabie-Zeitoune
Try specifying quote=NULL as an argument to read.table. It could be that one of your fields has a quote symbol in it. -Original Message- From: Ajay Shah [mailto:[EMAIL PROTECTED] Sent: 05 July 2004 11:15 To: r-help Subject: [R] Failing on reading a slightly big dataset I have a file

Re: [R] What is a sane way to deal with changes in library loadings after 1.9.0?

2004-07-05 Thread a . prioglio
On Mon, Jul 05, 2004 at 11:59:59AM +0200, Peter Dalgaard wrote: As I am using R on different machines, some are version 1.8.1 and some 1.9.1. One of the changes between these versions is the change in default libraries loaded when reading scripts. So I started my scripts with:

Re: [R] What is a sane way to deal with changes in library loadings after 1.9.0?

2004-07-05 Thread Prof Brian Ripley
On Mon, 5 Jul 2004 [EMAIL PROTECTED] wrote: On Mon, Jul 05, 2004 at 11:59:59AM +0200, Peter Dalgaard wrote: As I am using R on different machines, some are version 1.8.1 and some 1.9.1. One of the changes between these versions is the change in default libraries loaded when

[R] More difficulties in getting data into R

2004-07-05 Thread Ajay Shah
In order to get around the problems of my posting a few minutes ago, I thought: $ awk -F\| '(NR 2) {print $2}' cmie_firm_data.text col2 $ awk -F\| '(NR 2) {print $4}' cmie_firm_data.text col4 $ paste col2 col4 | head -2 -510.45 -510.27 60700 101900 $ paste col2 col4 | tail -2 28648.12

[R] make error for R-1.9.1

2004-07-05 Thread Robin Hankin
Hello everybody. I am trying to upgrade from R-1.9.0 to R-1.9.1 on a RedHat linux 2.4.18 system. I get the following error after tar -xvzf R-1.9.1.tgz ; cd ./R-1.9.1/ ; ./configure and make : [make works for 10 minutes ... snip ...] varExptexthtmllatex

Re: [R] Why does summary does not produce output?

2004-07-05 Thread Uwe Ligges
Peter Dalgaard wrote: Jozef De Herdt [EMAIL PROTECTED] writes: If I run the example from written with winedt. The summary command does not produce any output. It does when I repeat the command manualy in R. Can someone explain me what can be the problem? library(MASS) data(anorexia)

Re: [R] make error for R-1.9.1

2004-07-05 Thread Peter Dalgaard
Robin Hankin [EMAIL PROTECTED] writes: Error in .installPackageIndices(., /working/jrd/sat/rksh/R-1.9.1/library/nlme ) : cannot open directory'/working/jrd/sat/rksh/R-1.9.1/library/nlme/Meta' Execution halted ... I've had this three times now. How do I get round this? An offhand

Re: [R] What is a sane way to deal with changes in library loadings after 1.9.0?

2004-07-05 Thread a . prioglio
On Mon, Jul 05, 2004 at 11:51:25AM +0100, Prof Brian Ripley wrote: Well, I'm certainly new to R. Still without the explicit loading of the above libraries my scripts while loading on 1.8.1 were definetely not loading on 1.9.1. I'm using the same account on all machines so I expect to have

[R] design

2004-07-05 Thread [EMAIL PROTECTED]
Hi I have not understood very well how to realize, in limma package, the design (using factor in model.matrix) to insert in lmFit. I have an experiment with 4 groups (a,b,c,d) with 3 replicates for each-one and i have to compare a vs b; c vs d; ( ac )vs (bd). List Sample in pdata is like this:

[R] extract columns from a dataframe

2004-07-05 Thread Rado Bonk
Dear R users, I'm coming back to R after while. I have a data frame with 200 columns, each column has a name. How to extract all columns to a new dataset, but the specified (by names) ones? I was playing with that for a little bit using the vector syntax but got several syntax errors. Thanks,

Re: [R] What is a sane way to deal with changes in library loadings after 1.9.0?

2004-07-05 Thread Prof Brian Ripley
Your confusion is that you are trying to run scripts from .First. You did not say so, and that is strongly not recommended, especially if they might have errors. Use R CMD BATCH to run scripts and you will find it much easier. BTW, please send replies to the individual asking, not just to the

Re: [R] extract columns from a dataframe

2004-07-05 Thread Prof Brian Ripley
myDF[! names(myDF) %in% not_wanted] if I understand you aright. E.g. library(MASS) hills[! names(hills) %in% climb] which can also be done by subset(hills, select=-climb) On Mon, 5 Jul 2004, Rado Bonk wrote: I'm coming back to R after while. I have a data frame with 200 columns, each

RE: [R] extract columns from a dataframe

2004-07-05 Thread John Fox
Dear Rado, If the data frame is named df and nms is a vector names of the columns that you want to exclude, then df[,-sapply(nms, function(x) which(x == names(df)))] Should give you what you want. I hope that this helps, John -Original Message- From: [EMAIL PROTECTED]

[R] density(x)

2004-07-05 Thread Christoph Hanck
Dear experts, when trying to estimate an kernel density function with density(x) I get the following error message with imported data from either EXCEL or text files: Error in density(spr) : argument must be numeric. Other procedues such as truehist work. If I generate data within R density

Re: [R] density(x)

2004-07-05 Thread Winfried Theis
Hello! On Mon, 2004-07-05 at 15:34, Christoph Hanck wrote: Dear experts, when trying to estimate an kernel density function with density(x) I get the following error message with imported data from either EXCEL or text files: Error in density(spr) : argument must be numeric. Well, as R

Re: [R] extract columns from a dataframe

2004-07-05 Thread Yves Magliulo
hi, see colnames() simple use, good result. ex: if df is your data.frame and toto = the column name you want to extract do: df2-df[,colnames(df)==toto)] #extract all toto column Le lun 05/07/2004 à 14:53, Rado Bonk a écrit : Dear R users, I'm coming back to R after while. I have a data

Re: [R] density(x)

2004-07-05 Thread Marc Schwartz
On Mon, 2004-07-05 at 08:34, Christoph Hanck wrote: Dear experts, when trying to estimate an kernel density function with density(x) I get the following error message with imported data from either EXCEL or text files: Error in density(spr) : argument must be numeric. Other

[R] Tk force refresh

2004-07-05 Thread Mark White
I'm trying to use a Tk widget to show some progress intermediate results in a long-running R calculation. Does anybody know how (or whether) I can force a window redraw without waiting for the idle loop? Currently, refreshes only seem to happen when we return to the R toplevel read-eval-print

Re: [R] Tk force refresh

2004-07-05 Thread Peter Dalgaard
Mark White [EMAIL PROTECTED] writes: I'm trying to use a Tk widget to show some progress intermediate results in a long-running R calculation. Does anybody know how (or whether) I can force a window redraw without waiting for the idle loop? Currently, refreshes only seem to happen when

[R] passing char's from C to Fortran (mac os x)

2004-07-05 Thread Ingmar Visser
Hello All, In some package I use a c-routine which calls a fortran routine which expects a char-string as input. As per the writing R-extensions manual, the Fortran routine is declared in C as: void F77_NAME (setoptions) (char **option); and then it is calles as follows: char **option;

Re: [R] extract columns from a dataframe

2004-07-05 Thread Prof Brian Ripley
On 5 Jul 2004, Yves Magliulo wrote: see colnames() simple use, good result. Not really correct use, though. A data frame has names for its columns, and a matrix has colnames. ex: if df is your data.frame and toto = the column name you want to extract do: df2-df[,colnames(df)==toto)]

[R] R and databases (Oracle)

2004-07-05 Thread Rado Bonk
Dear R users, I'm working on implementation of hydrometeorological DB in Oracle9i and would like to use R, as a plotting engine for graphs and maps and also to perform some non trivial statistics on DB data using R. Thus any links with examples or efforts on: - general DB and R cooperation -

[R] Function for skewness

2004-07-05 Thread Ernesto Jardim
Hi, Is there a function to estimate the skewness of a distribution ? Thanks EJ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] density(x)

2004-07-05 Thread Christoph Hanck
Hello and thanks for your reply Hopefully, my answer arrives at the correct place like that (if not, I am sorry for bothering you, but please let me know...) To sum up my procedure (sp is exactly the same thing as spr, I had just tinkered with the names while trying sth. to solve this problem)

Re: [R] passing char's from C to Fortran (mac os x)

2004-07-05 Thread Prof Brian Ripley
On Mon, 5 Jul 2004, Ingmar Visser wrote: Hello All, In some package I use a c-routine which calls a fortran routine which expects a char-string as input. As per the writing R-extensions manual, the Fortran routine is declared in C as: void F77_NAME (setoptions) (char **option);

Re: [R] Function for skewness

2004-07-05 Thread Marc Schwartz
On Mon, 2004-07-05 at 09:49, Ernesto Jardim wrote: Hi, Is there a function to estimate the skewness of a distribution ? Thanks EJ See skewness() in CRAN package 'e1071'. HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing list

Re: [R] Function for skewness

2004-07-05 Thread Ernesto Jardim
On Mon, 2004-07-05 at 15:44, Marc Schwartz wrote: On Mon, 2004-07-05 at 09:49, Ernesto Jardim wrote: Hi, Is there a function to estimate the skewness of a distribution ? Thanks EJ See skewness() in CRAN package 'e1071'. HTH, Marc Schwartz Thanks EJ

Re: [R] density(x)

2004-07-05 Thread Prof Brian Ripley
OK, so sp is a data frame. Probably you want density(sp$sp) there since the single column is already numeric. It just so happens that truehist does an implicit drop() on a 1-column data frame. On Mon, 5 Jul 2004, Christoph Hanck wrote: Hello and thanks for your reply Hopefully, my answer

Re: [R] density(x)

2004-07-05 Thread Christoph Hanck
Hello, OK, so sp is a data frame. Probably you want density(sp$sp) there since the single column is already numeric. Yes, that works just the way I hoped. So what I am essentially doing is selecting (just to know what I'm doing) the column that contains sp from the data frame sp? Thank

Re: [R] density(x)

2004-07-05 Thread Gavin Simpson
Christoph Hanck wrote: Hello and thanks for your reply Hopefully, my answer arrives at the correct place like that (if not, I am sorry for bothering you, but please let me know...) To sum up my procedure (sp is exactly the same thing as spr, I had just tinkered with the names while trying sth. to

[R] using perm.cond index.cond in lattice package

2004-07-05 Thread 8rino-Luca Pantani
Dear R users, this is my first question to the list. I hope it will be not a trivial one. My problem is to change the order in which the panel are plotted in a lattice/Trellis plot. I've read the S-plus Trellis Graphics user manual, in which there is a function called reorder.factor, that, as far

Re: [R] density(x)

2004-07-05 Thread Marc Schwartz
On Mon, 2004-07-05 at 09:41, Christoph Hanck wrote: Hello and thanks for your reply Hopefully, my answer arrives at the correct place like that (if not, I am sorry for bothering you, but please let me know...) To sum up my procedure (sp is exactly the same thing as spr, I had just

Re: [R] R and databases (Oracle)

2004-07-05 Thread Sean Davis
Rado, Did you look at the package Roracle (http://cran.r-project.org/src/contrib/Descriptions/ROracle.html)? Sean On 7/5/04 10:25 AM, Rado Bonk [EMAIL PROTECTED] wrote: Dear R users, I'm working on implementation of hydrometeorological DB in Oracle9i and would like to use R, as a plotting

Re: [R] density(x)

2004-07-05 Thread Christoph Hanck
Hello, thanks again. Reading through An Introduction to R which is part of the default documentation set would be helpful to you in better understanding data types and dealing with data frame structures. I got the message! I admit that my systematic efforts into R may be considered

Re: [R] Tk force refresh

2004-07-05 Thread Mark White
Peter Dalgaard writes: Mark White [EMAIL PROTECTED] writes: Does anybody know how (or whether) I can force a window redraw without waiting for the idle loop? Currently, refreshes only seem to happen when we return to the R toplevel read-eval-print loop. I think it's tkcmd(update) or

[R] Behaviour of R with win98 and XP?

2004-07-05 Thread Richard Müller
Dear list, I encounter a strange problem: I hav R (1.6.1) installed on a notebook with winXP-Prof and a similar installation (same path names etc.) on a desktop computer with W98. I use rcmd BATCH filename to display graphs from the data stored in filename. With R on my notebook everything works

[R] Apparent conflict between \Sexpr in Sweave and R2HTML

2004-07-05 Thread Scott Waichler
I have come across an apparent bug in the operation of Sweave. If I load the package R2HTML then execution of \Sexpr{} in an *.Rnw file no longer works. The \Sexpr{} code is simply written to the *.tex file. Below are my *.Rnw file, commands, and output. The Sweave file,

[R] nonlinear regression with M estimation

2004-07-05 Thread Ruei-Che Liu
Hi All, Could any one tells me if R or S has the capacity to fit nonlinear regression with Huber's M estimation? Any suggestion is appreciated. I was aware of 'rlm' in MASS library for robust linear regression and 'nls' for nonlinear least squares regression, but did not seem to be able to

Re: [R] Behaviour of R with win98 and XP?

2004-07-05 Thread Prof Brian Ripley
What are you doing that creates a file path c://Temp//TempFile.csv? That is not a valid path under Windows: use / not // or, better, use file.path(). As far as I recall NT-based systems accept empty path elements and W98 does not. If this is really R 1.6.1, you are way overdue for an upgrade.

Re: [R] nonlinear regression with M estimation

2004-07-05 Thread roger koenker
the package nlrq does median nonlinear regression... among other things. url:www.econ.uiuc.edu/~rogerRoger Koenker email [EMAIL PROTECTED] Department of Economics vox:217-333-4558University of Illinois fax:

Re: [R] nonlinear regression with M estimation

2004-07-05 Thread Prof Brian Ripley
I don't think there is one. One problem is that both nls and robust procedures need a starting point and so you would need a good non-linear resistant method to start. (For certain Huber-type linear regressions you can show there is a unique solution and so any starting point will do. But that

Re: [R] using perm.cond index.cond in lattice package

2004-07-05 Thread Deepayan Sarkar
On Monday 05 July 2004 09:57, 8rino-Luca Pantani wrote: Dear R users, this is my first question to the list. I hope it will be not a trivial one. My problem is to change the order in which the panel are plotted in a lattice/Trellis plot. I've read the S-plus Trellis Graphics user manual, in

[R] contrib.url binary paths inconsistent

2004-07-05 Thread Paul Roebuck
Binary distribution [Windows] - contrib.url(getOption(CRAN)) [1] http://cran.r-project.org/bin/windows/contrib/1.9; Binary distribution [Mac OS X] - contrib.url(getOption(CRAN), type = mac.binary) [1]

[R] how to personalize split function in rpart

2004-07-05 Thread Simone Vantini
Hallo! I am a student of the Politecnico di Milano (Milan, italy) and I'm working on CARTs. I'm trying to use the R rpart function with a personalized splitfunction... but I'm not able to do it! More precisely, I would like to know what is the meaning of the function 'init', 'split' and 'eval'

Re: [R] how to personalize split function in rpart

2004-07-05 Thread Prof Brian Ripley
Have you looked at the package sources? Do read rpart/tests/usersplits.R. On Mon, 5 Jul 2004, Simone Vantini wrote: I am a student of the Politecnico di Milano (Milan, italy) and I'm working on CARTs. I'm trying to use the R rpart function with a personalized splitfunction... but I'm not

Re: [R] contrib.url binary paths inconsistent

2004-07-05 Thread Uwe Ligges
Paul Roebuck wrote: Binary distribution [Windows] - contrib.url(getOption(CRAN)) [1] http://cran.r-project.org/bin/windows/contrib/1.9; Correct. Binary distribution [Mac OS X] - contrib.url(getOption(CRAN), type = mac.binary) [1]

[R] How to check the code for generic function in a specific package?

2004-07-05 Thread F Duan
Hello, R people, I am a R beginner. I searched the R-FAQ and R-help and failed to find the answers. Could anyone tell me how to check (or edit) a generic function within a specific package? If the function is not generic, I can just type the function name at the R prompt or use fix() and

Re: [R] How to check the code for generic function in a specific package?

2004-07-05 Thread Uwe Ligges
F Duan wrote: Hello, R people, I am a R beginner. I searched the R-FAQ and R-help and failed to find the answers. Could anyone tell me how to check (or edit) a generic function within a specific package? If the function is not generic, I can just type the function name at the R prompt or

[R] System memory

2004-07-05 Thread Jean Eid
Dear All, I have been experiencing the following problem when I use a lot of system memory when using R heavily. Everytime I shutdown the process (Xemacs and ESS), my system remains slow and sometime does not respond. I use a debian testing machine. Even when I shutdown (halt) the system, it

Re: [R] counting the occurrences of vectors

2004-07-05 Thread Marc Schwartz
On Sun, 2004-07-04 at 19:28, Spencer Graves wrote: I see a case where f1 gives the wrong answer: b - array(c(a:b, a, c, b:c), dim=c(2,2)) a - b[c(1,1),] For these two matrices, f1(a,b) == c(2,2), while f2(a,b) == c(2,0). If b does not contain :, e.g., if it is

Re: [R] System memory

2004-07-05 Thread Jason Turner
Dear All, I have been experiencing the following problem when I use a lot of system memory when using R heavily. ... What version of R, Xemacs, ESS, and Debian? What are the crash symptoms (error message?). Have you tried upgrading everything you can (ESS has recently released a new stable

Re: [R] counting the occurrences of vectors

2004-07-05 Thread Gabor Grothendieck
Marc Schwartz MSchwartz at MedAnalytics.com writes: row.match.count - function(m1, m2) { if (ncol(m1) != (ncol(m2))) stop(Matrices must have the same number of columns) if (typeof(m1) != (typeof(m2))) stop(Matrices must have the same data type) m1.l -

[R] What precision is R

2004-07-05 Thread Laura Holt
Hello R People: What precision is R, please? 64 bit? Where would I find that out typically, please? Thanks in advance! Sincerely, Laura Holt mailto: [EMAIL PROTECTED] FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ __ [EMAIL PROTECTED]

Re: [R] counting the occurrences of vectors

2004-07-05 Thread Gabor Grothendieck
Marc Schwartz MSchwartz at MedAnalytics.com writes: the likely overhead involved in paste()ing together the rows to create objects I thought I would check this and it seems that in my original f1 function its not really the paste itself that's the bottleneck but applying the paste. If we

Re: [R] What precision is R

2004-07-05 Thread Prof Brian Ripley
On Mon, 5 Jul 2004, Laura Holt wrote: What precision is R, please? 64 bit? Your question lacks precision :) R uses the underlying double precision floating-point arithmetic of the OS it is running on. On all currrent platforms that we know of, that is IEC60566 arithmetic, with an (implicit)