Re: [R] PicTeX output: how to suppress escaping of $ signs and braces?

2007-09-25 Thread Prof Brian Ripley
R is trying to do device-independent graphics and produce the same annotation output on any graphics device. It assumes that when you write '$' you want a dollar sign, and so on. Also, it needs to be able to render the text to find its bounding box (and baseline) and so place it accurately.

Re: [R] how to export.RDA file to a text file?

2007-09-25 Thread Vladimir Eremeev
attach(file_name.RDA) dump(list=ls(2),file=file_name.R) This creates file file_name.R, containing R commands, executed to produce the contents of the file_name.RDA Data frames and matrices can be stored in ASCII file in tabular form using write.table() You can also consider cat() Jittima

Re: [R] Sweave and ggplot2

2007-09-25 Thread Ken Knoblauch
Julien Barnier julien at no-log.org writes: Hi, When I try this example at work, I got an error message during Sweave which is close from something like warning : semitransparency not supported by this device. When I try at home (with the given sessionInfo), I got no warning but in both

[R] How to read stored functions

2007-09-25 Thread Mauricio Malfert
Hi I'm simulating missing data patterns and I've started to get a lot of functions in the same .R file is it possible to store al these functions in a library like one does in C++ (i.e the .h file) and read the functions from the main .R file /Mauricio [[alternative HTML version

Re: [R] How to read stored functions

2007-09-25 Thread Vladimir Eremeev
Mauricio Malfert wrote: Hi I'm simulating missing data patterns and I've started to get a lot of functions in the same .R file is it possible to store al these functions in a library like one does in C++ (i.e the .h file) and read the functions from the main .R file /Mauricio You

[R] Am I misunderstanding the ifelse construction?

2007-09-25 Thread Karin Lagesen
I have a function like this: changedir - function(dataframe) { dir - dataframe$dir gc_content - dataframe$gc_content d - ifelse(dir == -, gc_content - -gc_content,gc_content - gc_content) return(d) } The goal of this function is to be able to input a data frame like this: lala

Re: [R] How to read stored functions

2007-09-25 Thread Jared O'Connell
Having your functions in a text file, say functions.r and then calling: source(functions.r) is also an option. This assumes you are in the same directory as functions.r. Perhaps take a look at ?setwd and ?getwd as well. On 9/25/07, Vladimir Eremeev [EMAIL PROTECTED] wrote: Mauricio

Re: [R] How to read stored functions

2007-09-25 Thread Vladimir Eremeev
source'ing is a bad practice because this saves additional copies of functions and data in the local workspace. Wasting disk space is not a problem now since HDDs are cheap and function bodies are generally small. But, when you change any function body, you have to repeat that source() call in

Re: [R] Am I misunderstanding the ifelse construction?

2007-09-25 Thread Peter Dalgaard
Karin Lagesen wrote: I have a function like this: changedir - function(dataframe) { dir - dataframe$dir gc_content - dataframe$gc_content d - ifelse(dir == -, gc_content - -gc_content,gc_content - gc_content) return(d) } The goal of this function is to be able to input a

Re: [R] Am I misunderstanding the ifelse construction?

2007-09-25 Thread Gustaf Rydevik
On 9/25/07, Karin Lagesen [EMAIL PROTECTED] wrote: I have a function like this: changedir - function(dataframe) { dir - dataframe$dir gc_content - dataframe$gc_content d - ifelse(dir == -, gc_content - -gc_content,gc_content - gc_content) return(d) } The goal of this

Re: [R] Am I misunderstanding the ifelse construction?

2007-09-25 Thread Eik Vettorazzi
d - ifelse(dir == -, -gc_content , gc_content) works. You need not assign gc_content a new value in each comparison, because then your result depends only on the last value of dir, which happened to be -, so you got -0.5 for all gc_content. hth Karin Lagesen schrieb: I have a function like

[R] 10- fold cross validation for naive bayes(e1071)

2007-09-25 Thread Julia Kröpfl
Hallo! I would need a code for 10-fold cross validation for the classifiers Naive Bayes and svm (e1071) package. Has there already been done something like that? I tried to do it myself by applying the tune function first: library(e1071) tune.control - tune.control(random =F, nrepeat=1,

Re: [R] RJDBC and rjava

2007-09-25 Thread Joe W. Byers
Help is sincerely requested. After further investigation, I found that if I run .jmethods and have the listing below. I know that this driver works because I have a java program using that loads data scrapped from the web every night. The call to JDBC in my previous email is trying to create

Re: [R] calculating/plotting error ellipses

2007-09-25 Thread Jan M. Wiener
Hello, thank you very much for the quick answer. This works well. it draws a nice ellipse in the right orientation. However, I doubt that the ellipse represents the 95% confidence interval, even if that is the standard-parameter for level is .95. The ellipse surely is to large? Any further help

Re: [R] PicTeX output: how to suppress escaping of $ signs and braces?

2007-09-25 Thread Dan Hatton
On Tue, 25 Sep 2007, Prof Brian Ripley wrote: R is trying to do device-independent graphics and produce the same annotation output on any graphics device. It assumes that when you write '$' you want a dollar sign, and so on. Also, it needs to be able to render the text to find its bounding

[R] R Wiki down on 27 September

2007-09-25 Thread Philippe Grosjean
Hi all, Following the major electricity problem we got at the University during the summer (the R Wiki was down for several days), there is a need for shutting off electricity on the whole campus for a full day to fix it next Thursday 27 September. Consequently, the R Wiki may be down for up

Re: [R] How to read stored functions

2007-09-25 Thread Jared O'Connell
...and my R education (and embarassment) continues ;) On 9/25/07, Vladimir Eremeev [EMAIL PROTECTED] wrote: source'ing is a bad practice because this saves additional copies of functions and data in the local workspace. Wasting disk space is not a problem now since HDDs are cheap and

Re: [R] Am I misunderstanding the ifelse construction?

2007-09-25 Thread Erich Neuwirth
The thing to remember is that ifelse is a function, it returns a value, so usually one does not need assignments within the function call. You also could do: negindices - dir==- gc_content[negindices] - -gc_content[negindices] Eik Vettorazzi wrote: d - ifelse(dir == -, -gc_content , gc_content)

[R] Who uses R?

2007-09-25 Thread Eleni Rapsomaniki
Dear R users, I have started work in a Statistics government department and I am trying to convince my bosses to install R on our computers (I can't do proper stats in Excel!!). They asked me to prove that this is a widely used software (and not just another free-source, bug infected toy I found

Re: [R] Who uses R?

2007-09-25 Thread Gesmann, Markus
Dear Eleni, Maybe the participants of the useR conferences are a good start, see e.g. http://www.r-project.org/useR-2006/participants.html Kind regards, Markus Gesmann FPMA Lloyd's Market Analysis Lloyd's * One Lime Street * London * EC3M 7HA Telephone +44 (0)20 7327 6472 Fax +44 (0)20

Re: [R] finding a stable cluster for kmeans

2007-09-25 Thread Wayne.W.Jones
Hi there, If the final predicted clusters vary according to a random starting cluster then I suspect that your data is not clustering very well!! A few reasons for this may be: 1) There are genuinely no clusters in the data! 2) You have chosen a poor distance measure. 3) You have picked an

Re: [R] Who uses R?

2007-09-25 Thread Gustaf Rydevik
On 9/25/07, Eleni Rapsomaniki [EMAIL PROTECTED] wrote: Dear R users, I have started work in a Statistics government department and I am trying to convince my bosses to install R on our computers (I can't do proper stats in Excel!!). They asked me to prove that this is a widely used software

Re: [R] How to read stored functions

2007-09-25 Thread Mark Wardle
Jared: I agree with your advice - I use source() too! I think I work in a different way to many, and don't ever save current workspace but use the interactive R environment cutting and pasting code from documents held under version control. As long as one is careful, I don't think there is any

Re: [R] Who uses R?

2007-09-25 Thread Simon Blomberg
See the Members and Donors section on the left-hand side of the R web site. Cheers, Simon. Note to self: Become a supporting member. On Tue, 2007-09-25 at 11:59 +0100, Gesmann, Markus wrote: Dear Eleni, Maybe the participants of the useR conferences are a good start, see e.g.

Re: [R] Who uses R?

2007-09-25 Thread Patrick Burns
Just speaking of the field I'm most familiar with, there are now users of R in many of the largest financial companies in the world. http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html is one place to look for arguments against Excel. This was just updated to include an amusing

Re: [R] Who uses R?

2007-09-25 Thread Prof Brian Ripley
That's a good answer, but the usage is very much wider. As Pat Burns has just replied while I was composing this, many (maybe most) major financial institutions use R, although they may not want that to be taken as an endorsement. Similarly for pharmaceuticals. I would have thought a very

Re: [R] Who uses R?

2007-09-25 Thread Ted Harding
On 25-Sep-07 10:46:17, Eleni Rapsomaniki wrote: Dear R users, I have started work in a Statistics government department and I am trying to convince my bosses to install R on our computers (I can't do proper stats in Excel!!). They asked me to prove that this is a widely used software (and

Re: [R] Who uses R?

2007-09-25 Thread Ted Harding
On 25-Sep-07 11:11:44, Patrick Burns wrote: Just speaking of the field I'm most familiar with, there are now users of R in many of the largest financial companies in the world. http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html is one place to look for arguments against

Re: [R] Who uses R?

2007-09-25 Thread Thomas Adams
Eleni, FWIW, there are a number of us in the U.S. NOAA/National Weather Service and at the National Center for Atmospheric Research (NCAR) (who wrote the 'Verification' package) who use R for verification of meteorological and hydrologic forecasts, aiding in the calibration of distributed

Re: [R] How to read stored functions

2007-09-25 Thread Duncan Murdoch
On 9/25/2007 4:15 AM, Vladimir Eremeev wrote: source'ing is a bad practice because this saves additional copies of functions and data in the local workspace. Wasting disk space is not a problem now since HDDs are cheap and function bodies are generally small. But, when you change any

[R] Create grouping from TukeyHSD (as a duncan test does)?

2007-09-25 Thread bernhard.mueller
Hello everybody 1. If there is/ever will be a function to perform duncan multiple range test please inform me at once. 2. Is there a way to create a grouping as duncan does from TukeyHSD output? My experimental design contained 62 genotypes, so the pairwise comparison is not that usefull and

Re: [R] Importing a dataset

2007-09-25 Thread Prof Brian Ripley
On Fri, 21 Sep 2007, Gabor Csardi wrote: I don't know a way of loading parts of an .RData file either, You can't easily do it, as named objects are not stored separately in such a file (nor in memory in R). See the 'R Internals' manual for a description of the format. This would be

Re: [R] Who uses R?

2007-09-25 Thread Ted Harding
On 25-Sep-07 12:34:47, Duncan Murdoch wrote: On 9/25/2007 7:45 AM, (Ted Harding) wrote: On 25-Sep-07 11:11:44, Patrick Burns wrote: Just speaking of the field I'm most familiar with, there are now users of R in many of the largest financial companies in the world.

[R] Erro plot

2007-09-25 Thread Caio Azevedo
Hi all, I would like to generate a erro bar plot. I have already the means and the SE calculated.How could I plot these values with the means represented by points and erro bars, one up another down, representing the +- the SE? Thanks in advance, Bets regards, Caio [[alternative HTML

Re: [R] Erro plot

2007-09-25 Thread John Kane
Have a look at plotCI in the plotrix package. --- Caio Azevedo [EMAIL PROTECTED] wrote: Hi all, I would like to generate a erro bar plot. I have already the means and the SE calculated.How could I plot these values with the means represented by points and erro bars, one up another down,

[R] Announcement: 2008 ASA Computing/Graphics Student Paper Competition

2007-09-25 Thread J.R. Lockwood
Statistical Computing and Statistical Graphics Sections American Statistical Association Student Paper Competition 2008 The Statistical Computing and Statistical Graphics Sections of the ASA are co-sponsoring a student paper competition on the topics of Statistical Computing and Statistical

Re: [R] Proposal: Archive UseR conference presentations at www.r-project.org/useR-yyyy

2007-09-25 Thread hadley wickham
but I can understand your desire to do that. Perhaps just taking a static snapshot using something like wget, and hosting that on the R-project website would be a good compromise. Hmm, wouldn't it be easier if the hosting institution would make a tgz file? wget over HTTP is

[R] Multiple comparisons; rank-based anova

2007-09-25 Thread Mark Difford
Dear List-Members, Is the application of multiple comparison procedures (using the multcomp package) to the output from a rank-based ANOVA straightforward, or do I need to take heed ? That is, is it as simple as: glht( aov(rank(NH4) ~ Site, data=mydat), linfct=mcp(Site=Tukey) ) Thanks in

Re: [R] How to read stored functions

2007-09-25 Thread Vladimir Eremeev
Duncan Murdoch-2 wrote: On 9/25/2007 4:15 AM, Vladimir Eremeev wrote: source'ing is a bad practice because this saves additional copies of functions and data in the local workspace. Wasting disk space is not a problem now since HDDs are cheap and function bodies are generally small.

[R] fSeries Garch and Arfima Ox interface

2007-09-25 Thread Ian McHale
Hello all, This is a request for help from somebody who has the Ox interfaces working in R. I am trying to get the Ox interfaces working for Arfima and Garch modelling. However, I am having several problems: 1. The link to download [EMAIL PROTECTED] does not work. Does anybody have a copy

[R] Spacing between x axis and labels

2007-09-25 Thread Christian Schäfer
Hi, my x-axis contains labels that consist of two lines (the actual label and below information about groupsize). Unfortunately, there is too little spacing between labels and tickmarks in this situation. Is there a parameter to tune spacing between axis and labels? Thanks, Chris

Re: [R] Spacing between x axis and labels

2007-09-25 Thread Marc Schwartz
On Tue, 2007-09-25 at 15:39 +0200, Christian Schäfer wrote: Hi, my x-axis contains labels that consist of two lines (the actual label and below information about groupsize). Unfortunately, there is too little spacing between labels and tickmarks in this situation. Is there a parameter to

Re: [R] Rolling Window with 2 Input Vectors

2007-09-25 Thread Achim Zeileis
On Tue, 25 Sep 2007, Martin Efferz wrote: Is there a function which does a rolling calcualtion with 2 input vectors. rollapply and rollFun seem to use only one input vector. In rollapply(), you need to set by.column=FALSE, e.g. ## generate random series of true and predicted values

Re: [R] Score test in logistic regression in R

2007-09-25 Thread Marc Schwartz
On Mon, 2007-09-24 at 21:36 -0400, Paek, Insu wrote: Hello, I am wondering if R has any ways to conduct the score test in logistic regression? Could you let me know please? Thanks, Insu You may need to provide further clarification, as the most common reference to a score test

Re: [R] Spacing between x axis and labels

2007-09-25 Thread Mark Difford
Also look at the mgp option under ?par. This allows one to set the margin line for axis title, axis labels and axis line... Regards, Mark Difford. Marc Schwartz wrote: On Tue, 2007-09-25 at 15:39 +0200, Christian Schäfer wrote: Hi, my x-axis contains labels that consist of two lines

Re: [R] Who uses R?

2007-09-25 Thread Daniel Malter
Hi, although this is a guess, I would dare to say that it is probably used in at least some schools/departments of any research university. Yet, universities/schools often have a plethora of statistical softwares available (in our school, for instance, SAS, Stata, SPSS, S-Plus) so it is not THE

Re: [R] Who uses R?

2007-09-25 Thread Patrick Burns
(Ted Harding) wrote: On 25-Sep-07 12:34:47, Duncan Murdoch wrote: On 9/25/2007 7:45 AM, (Ted Harding) wrote: On 25-Sep-07 11:11:44, Patrick Burns wrote: Just speaking of the field I'm most familiar with, there are now users of R in many of the largest financial companies in the

Re: [R] calculating/plotting error ellipses

2007-09-25 Thread Prof Brian Ripley
On Tue, 25 Sep 2007, Jan M. Wiener wrote: Hello, thank you very much for the quick answer. This works well. it draws a nice ellipse in the right orientation. However, I doubt that the ellipse represents the 95% confidence interval, even if that is the standard-parameter for level is .95.

[R] 3d barplot in rgl

2007-09-25 Thread stubben
Is there anyway to plot a matrix using a 3d bar plot. Something like bar3 in matlab? The example in demo hist3d does a 3d barplot for binned data, but has anyone tried something for a simple matrix with spaces betwen bars and axis labels using matrix dimnames or 1,2,3? stages-letters[1:3]

Re: [R] 3d barplot in rgl

2007-09-25 Thread hadley wickham
Why do you want a 3d barchart? They are generally a bad way to present information as tall bars can obscure short bars, and it is hard to accurately read off the height of a bar. While adding rotation can reduce some of these problems, why not create a graphic that your viewers can take in with

Re: [R] 3d barplot in rgl

2007-09-25 Thread Duncan Murdoch
On 9/25/2007 2:34 PM, stubben wrote: Is there anyway to plot a matrix using a 3d bar plot. Something like bar3 in matlab? The example in demo hist3d does a 3d barplot for binned data, but has anyone tried something for a simple matrix with spaces betwen bars and axis labels using matrix

Re: [R] 3d barplot in rgl

2007-09-25 Thread Chris Stubben
hadley wickham h.wickham at gmail.com writes: Why do you want a 3d barchart? They are generally a bad way to present information as tall bars can obscure short bars, and it is hard to accurately read off the height of a bar. While adding rotation can reduce some of these problems, why not

[R] R2Winbugs problem

2007-09-25 Thread Sam_zhz
Just while I use R2Winbugs, the following error will be presented. Please tell me how to cope with. Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file 'codaIndex.txt', reason 'No such file or directory' in: file(file, r) Thanks Sam_zhz -- View this

[R] R2Winbugs problem

2007-09-25 Thread Sam_zhz
Just while I use R2Winbugs, the following error will be presented. Please tell me how to cope with. Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file 'codaIndex.txt', reason 'No such file or directory' in: file(file, r) Thanks Sam_zhz -- View this

[R] R2Winbugs problem

2007-09-25 Thread Sam_zhz
Just while I use R2Winbugs, the following error will be presented. Please tell me how to cope with. Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file 'codaIndex.txt', reason 'No such file or directory' in: file(file, r) Thanks Sam_zhz -- View this

[R] R2Winbugs problem

2007-09-25 Thread Sam_zhz
Just while I use R2Winbugs, the following error will be presented. Please tell me how to cope with. Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file 'codaIndex.txt', reason 'No such file or directory' in: file(file, r) Thanks Sam_zhz -- View this

[R] R2Winbugs problem

2007-09-25 Thread Sam_zhz
Just while I use R2Winbugs, the following error will be presented. Please tell me how to cope with. Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file 'codaIndex.txt', reason 'No such file or directory' in: file(file, r) Thanks Sam_zhz -- View this

[R] R2Winbugs problem

2007-09-25 Thread Sam_zhz
Just while I use R2Winbugs, the following error will be presented. Please tell me how to cope with. Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file 'codaIndex.txt', reason 'No such file or directory' in: file(file, r) Thanks Sam_zhz -- View this

Re: [R] 3d barplot in rgl

2007-09-25 Thread Chris Stubben
Duncan Murdoch murdoch at stats.uwo.ca writes: That demo gives you the basics of the code, so it shouldn't be too hard to put your own together: just strip out the counting part. Thanks, I did download the source to check the hist3d demo, but honestly it didn't look very easy to

[R] Can't update packages because of -lgfortran

2007-09-25 Thread vittorio
Under freebsd 6.2 intel Duo, R 2.5.1 I can't update some packages (14 now) because of a problem with -lgfortran, e.g. update.packages(Hmisc) ... * Installing *source*

[R] extracting data using strings as delimiters

2007-09-25 Thread lucy b
Dear List, I have an ascii text file with data I'd like to extract. Example: Year Built: 1873 Gross Building Area: 578 sq ft Total Rooms: 6 Living Area: 578 sq ft There is a lot of data I'd like to ignore in each record, so I'm hoping there is a way to use strings as delimiters to get the

Re: [R] extracting data using strings as delimiters

2007-09-25 Thread Katharine Mullen
have you seen help(strsplit)? On Tue, 25 Sep 2007, lucy b wrote: Dear List, I have an ascii text file with data I'd like to extract. Example: Year Built: 1873 Gross Building Area: 578 sq ft Total Rooms: 6 Living Area: 578 sq ft There is a lot of data I'd like to ignore in each

Re: [R] extracting data using strings as delimiters

2007-09-25 Thread Gabor Grothendieck
Perhaps you could clarify what the general rule is but assuming that what you want is any word after a colon it can be done with strapply in the gsubfn package like this: Lines - c(Year Built: 1873 Gross Building Area: 578 sq ft, Total Rooms: 6 Living Area: 578 sq ft) library(gsubfn)

Re: [R] 3d barplot in rgl

2007-09-25 Thread bbolker
hadley wrote: On 9/25/07, Chris Stubben [EMAIL PROTECTED] wrote: hadley wickham h.wickham at gmail.com writes: Why do you want a 3d barchart? They are generally a bad way to present information as tall bars can obscure short bars, and it is hard to accurately read off the height

[R] Paste a matrix column in pairwise fashion with other columns?

2007-09-25 Thread Luke Neraas
#Hello, #I have would like to paste a single column of a matrix # in pair wise fashion with other columns based upon # even and odd column numbers. # I can do it in a very clunky fashion and I know there # must be a better way. below is a sample matrix and my extremely # clunky code that gets the

Re: [R] Paste a matrix column in pairwise fashion with other columns?

2007-09-25 Thread jim holtman
try this: P.genotype.sample-matrix(10,10,10) P.genotype.sample[,1]-c(2,2,1,5,1,1,5,6,1,3) P.genotype.sample[,2]-c(6,3,3,6,8,1,6,7,2,3) P.genotype.sample[,3]-c(2,2,2,3,3,2,2,2,3,3) P.genotype.sample[,4]-c(2,8,8,3,8,2,8,3,4,3) P.genotype.sample[,5]-c(3,3,8,3,6,1,1,1,1,3)

Re: [R] xtable with dupplicate rownames

2007-09-25 Thread sacha . kapoor
Hello Ani, I am having the same problem with xtable and duplicate rownames. Would it be possible for you to post your solution? Best, Sacha Kapoor PhD Candidate Department of Economics University of Toronto __ R-help@r-project.org mailing list

[R] sprucing up the R homepage

2007-09-25 Thread Finny Kuruvilla
I've been a R-user for quite some time. The graphic on the home page looks a bit in need of polish so I applied some antialiased transformations that Peter Dalgaard has previously posted to R-help for improving graphic quality. I had to change the margins a bit, but here is what it looks like:

Re: [R] sprucing up the R homepage

2007-09-25 Thread Rolf Turner
Although overall the new graphic looks better --- cleaner, clearer --- I think that the clustering graphic (tree, bottom left) has taken a step backward. cheers, Rolf Turner On 26/09/2007, at 2:53 PM, Finny Kuruvilla wrote: I've been

[R] Calling R function from Java

2007-09-25 Thread adschai
Hi - I would like to have the same functionality like what R(D)COM server offers but from Java world. I have java code (on windows) and need to call some R code to run some computational job and get the result back into java code. I'm wondering if there's any direct package that offers this

Re: [R] sprucing up the R homepage

2007-09-25 Thread Tim Churches
Finny Kuruvilla [EMAIL PROTECTED] wrote: I've been a R-user for quite some time. The graphic on the home page looks a bit in need of polish so I applied some antialiased transformations that Peter Dalgaard has previously posted to R-help for improving graphic quality. I had to change the