[R] ggplot2 - plot with only legend?

2008-04-12 Thread Pedro de Barros
I just found out that this message got scrambled with other threads, so I trying to re-send... Dear R'ers, I am trying to build a composite plot (with several plots in one figure). I have tried, but I cannot use facetting, as I need to customize each plot using grid. Since all the plots are the

[R] R and Excel disagreement - Goal Seek versus uniroot

2008-04-12 Thread Troels Ring
Dear friends - occurring in Windows R2.6.2 I am modeling physical chemistry in collaboration with a friend who has preferred working in Excel. I used uniroot, and find a solution to a two buffer problem in acid-base chemistry which I believe is physiologically sensible. Using goal seek in Excel

Re: [R] R and Excel disagreement - Goal Seek versus uniroot

2008-04-12 Thread Peter Dalgaard
Troels Ring wrote: Dear friends - occurring in Windows R2.6.2 I am modeling physical chemistry in collaboration with a friend who has preferred working in Excel. I used uniroot, and find a solution to a two buffer problem in acid-base chemistry which I believe is physiologically sensible.

[R] Matrix Indexing

2008-04-12 Thread Rory Winston
Hi Does anyone know how I might pick out diagonal elements of a matrix using a vector? If I create a matrix a: a - matrix(c(1:16), 4, byrow=TRUE) and I want to pick out the elements (1,1),(2,2),(3,3), or another arbitrary diagonal (upper or lower), is there any way I can use a vector to do

Re: [R] Matrix Indexing

2008-04-12 Thread Chuck Cleland
On 4/12/2008 5:56 AM, Rory Winston wrote: Hi Does anyone know how I might pick out diagonal elements of a matrix using a vector? If I create a matrix a: a - matrix(c(1:16), 4, byrow=TRUE) and I want to pick out the elements (1,1),(2,2),(3,3), or another arbitrary diagonal (upper or

Re: [R] Matrix Indexing

2008-04-12 Thread Gavin Simpson
On Sat, 2008-04-12 at 10:56 +0100, Rory Winston wrote: Hi Does anyone know how I might pick out diagonal elements of a matrix using a vector? If I create a matrix a: a - matrix(c(1:16), 4, byrow=TRUE) Not sure if this does all that you describe below, but: diag(a) and you can subset

Re: [R] Matrix Indexing

2008-04-12 Thread Duncan Murdoch
Rory Winston wrote: Hi Does anyone know how I might pick out diagonal elements of a matrix using a vector? If I create a matrix a: a - matrix(c(1:16), 4, byrow=TRUE) and I want to pick out the elements (1,1),(2,2),(3,3), or another arbitrary diagonal (upper or lower), is there any way I

[R] FW:

2008-04-12 Thread Louisa Hay
Hi, I'm doing a stats project using R to work out the size of a t-test and wilcoxon test depending on the distribution and sample size. I just can't get it to work - I want to put my results from the function size() into an array.At the moment I keep getting the error message:Error in

Re: [R] Multinomial Logit Regression

2008-04-12 Thread _Fede_
Hi again. I believe that I described the things bad before. I want to make the analysis with a sample data (train.set) of dataset for later see if the predictions adjust to the rest of data non selected with the sample train. Then, of the same form in glm: library(nnet) net -

[R] Response to R across the university

2008-04-12 Thread Antony Unwin
This email isn't asking for assistance, but I thought R-help readers would find it interesting. This week we offered a half-day introduction to R for researchers at Augsburg University. The response was astonishing. Although Augsburg has no medical faculty and no engineers, there was

Re: [R] two graphs in one figure?

2008-04-12 Thread Anne-Katrin Link
Dear Greg, dear all, thank you for your reply! To clarify, here is an example of what I want to do (but better, of course!): x- c(1,2,3,4,5) y- 0:4 y2-   c(0,0,7,8,9) barplot(y ,ylim=c(-1,10), ylab=, xaxt=n,yaxt=n, main=) axis(4,at=c(1,2,3,4,5,6)) text(6,2.9, 2nd y-axis, srt = 270,

Re: [R] Response to R across the university

2008-04-12 Thread Frank E Harrell Jr
Antony Unwin wrote: This email isn't asking for assistance, but I thought R-help readers would find it interesting. This week we offered a half-day introduction to R for researchers at Augsburg University. The response was astonishing. Although Augsburg has no medical faculty and

[R] lm() of one matrix against another

2008-04-12 Thread baptiste Auguié
Hello R list, I have two matrices of identical dimensions, and I want to fit a straight line for each pair of columns and plot the resulting lines. I got it to work with a for loop, but there must be a better way, n-5 N-10 data.x-matrix(1:(n*N),ncol=n) data.y-matrix(1:(n*N) +

Re: [R] Multinomial Logit Regression

2008-04-12 Thread Ruben Roa Ureta
Hi again. I believe that I described the things bad before. I want to make the analysis with a sample data (train.set) of dataset for later see if the predictions adjust to the rest of data non selected with the sample train. Then, of the same form in glm: library(nnet) net -

Re: [R] Multinomial Logit Regression

2008-04-12 Thread Prof Brian Ripley
The function in package nnet for 'Multinomial Logit Regression' is called multinom() and not nnet(). You seem not to have used it, and therein lies your error. If you need more help, multinom() is support software for a book (see library(help=nnet)), and the book has extensive worked

[R] extracting posterior variances of random effects (lme vs. lmer)

2008-04-12 Thread Sam Field
List, I am having trouble locating documentation on how one extracts posterior variances of the random effects from an lme object. I have found equivalent documentation for lmer(using ranef()), but nothing for lme. Any help would be greatly appreciated! Sam -- Note the new

Re: [R] Legend position outside

2008-04-12 Thread Greg Snow
Type ?par at the command line to bring up the help page, then scroll down and read the sections on xpd and usr. From: Edwin Sendjaja [mailto:[EMAIL PROTECTED] Sent: Fri 4/11/2008 9:56 PM To: Greg Snow; r-help@r-project.org Subject: Re: [R] Legend position

Re: [R] two graphs in one figure?

2008-04-12 Thread Greg Snow
Barplot is probably not the best way here (it is possible, but more work than it is worth). Here is one approach that gives something similar to what you want: plot(x, y, lend=1, lwd=25, ylim=c(-1,10), xlim=c(0.75,5.25),type='h', col='grey') lines(x, y2) Is that good enough? or do you

[R] Solving ODEs

2008-04-12 Thread Jaroslav Urbánek
Hello. I'm solving ODEs in R. I need as many methods as possible, so I downloaded the Fortran functions from http://www.netlib.org/ode/. Then I created DLLs and dyn.loaded them to R. Problem is that I don't know how to use them. I've been trying for many days and can't solve it. So I would be

[R] Predict Function

2008-04-12 Thread Biago
Hi all - my first time here and am having an issue with the Predict function. I am using a tutorial as a guide, locate here: http://www.ats.ucla.edu/STAT/R/dae/mlogit.htm My code gives this error newdata1$predicted - predict(mlogit,newdata=newdata1,type=response) Error in

Re: [R] Mapping file-Legend- from 2 Files/Tables

2008-04-12 Thread Edwin Sendjaja
Does anyone know how to solve this. I am so desperate. I'd be terribly grateful for any help. Am Samstag, 12. April 2008 05:19:16 schrieb Edwin Sendjaja: Hello, I have got 2 Tables from different files: Table 1 (lets say file: Salesman.data) | ID | User_ID

[R] Multivariate Makov Regime Switch

2008-04-12 Thread K1
Dear All, I was looking for a package covering multivariate markov regime switch models for non-observed regimes. Is there anything out there? Keywan http://www.arasgallery.com http://www.arasgallery.com -- View this message in context:

Re: [R] Mapping file-Legend- from 2 Files/Tables

2008-04-12 Thread Gabor Grothendieck
See ?merge ?match for two different ways and do an RSiteSearch for those to find examples in the archives On Sat, Apr 12, 2008 at 12:19 AM, Edwin Sendjaja [EMAIL PROTECTED] wrote: Hello, I have got 2 Tables from different files: Table 1 (lets say file: Salesman.data) |

Re: [R] Solving ODEs

2008-04-12 Thread Peter Dalgaard
Jaroslav Urbánek wrote: Hello. I'm solving ODEs in R. I need as many methods as possible, so I downloaded the Fortran functions from http://www.netlib.org/ode/. Then I created DLLs and dyn.loaded them to R. Problem is that I don't know how to use them. I've been trying for many days and

Re: [R] lm() of one matrix against another

2008-04-12 Thread Henrique Dallazuanna
Try mapply(function(x,y)lm(y~x),as.data .frame(data.x),as.data.frame(data.y),SIMPLIFY=F) 2008/4/12, baptiste Auguié [EMAIL PROTECTED]: Hello R list, I have two matrices of identical dimensions, and I want to fit a straight line for each pair of columns and plot the resulting lines. I got it

Re: [R] two graphs in one figure?

2008-04-12 Thread Anne-Katrin Link
Dear Greg, thank you again for your help. The graph looks much better now. However, I need the bars to be assigned to the left y-axis, and the lines should be assigned to the right y-axis (the y-axes have different ranges,e.g. left y-axis 0-20, and right y-axis 0-1). Also would be nice if the

[R] nonlinear curve fitting on a torus

2008-04-12 Thread Sungsu
Dear R users. I have data observed on the surface of a torus, and am trying to fit the nonlinear regression using the geodesic equation on a torus. Could anyone give me a helpful advise on this problem? I would definitely appreicate your reply. Sincerely,

Re: [R] Predict Function

2008-04-12 Thread hadley wickham
On Sat, Apr 12, 2008 at 1:06 PM, Biago [EMAIL PROTECTED] wrote: Hi all - my first time here and am having an issue with the Predict function. I am using a tutorial as a guide, locate here: http://www.ats.ucla.edu/STAT/R/dae/mlogit.htm My code gives this error newdata1$predicted -

[R] how many records R can display on the screen?

2008-04-12 Thread john useast
Dear R friends: Sorry this might be a trivial question: I have about 8000 records with 11 variables in csv format. I did get it into R. head and tail all tell every record is in the memory. However, when i tried to print it, only last 1000 records stay in the screen; the rest just gone

Re: [R] how many records R can display on the screen?

2008-04-12 Thread Charles C. Berry
On Sat, 12 Apr 2008, john useast wrote: John, Do not hijack an existing thread to ask a new question. You have replied to Hadley's reply to Biago and changed the subject line. Instead, start a new thread unsing 'Compose' or whatever capability your mail agent has to create a new message. I

[R] Extracting a data.frame from HTML code

2008-04-12 Thread Ethan Pew
Dear all, I'd like to use R to read in data from the web. I need some help finding an efficient way to strip the HTML tags and reformat the data as a data.frame to analyze in R. I'm currently using readLines() to read in the HTML code and then grep() to isolate the block of HTML code I want from

Re: [R] Extracting a data.frame from HTML code

2008-04-12 Thread Martin Morgan
Hi Ethan -- Use the XML library library(XML) url - 'http://www.nascar.com/races/cup/2007/1/data/standings_official.html' xml - htmlTreeParse(url, useInternal=TRUE) The previous line retrieves the html and stores it in an internal represnetation. There are warnings, but I think these are

[R] SPSS to R Data file conversion

2008-04-12 Thread Robert Baer
I wrote a little routine to convert multiple spss data files (as data frames) to R data files. The code is as follows: # list=dir(pattern=.sav) library(foreign) for (i in 1:length(list)){ # The saved data frame will be dat dat=read.spss(list[i],to.data.frame=TRUE)

Re: [R] Predict Function

2008-04-12 Thread Bill.Venables
The problem comes from fitting the model using a formula like this: mlogit - vglm(bcsse$Active ~ bcsse$Impinteg + bcsse$Hsgradyr, family = multinomial(), na.action=na.pass) If you write the formula in that form, prediction will be virtually impossible, because it will be looking for

Re: [R] SPSS to R Data file conversion

2008-04-12 Thread jim holtman
?assign I think this will work for you. list=dir(pattern=.sav) library(foreign) for (i in 1:length(list)){ # The saved data frame will be dat name=substring(list[i],1,nchar(list[i])-4) assign(name, read.spss(list[i],to.data.frame=TRUE)) rname=paste(../R/,name,.rda,sep=) #

Re: [R] how many records R can display on the screen?

2008-04-12 Thread jim holtman
?View On Sat, Apr 12, 2008 at 5:47 PM, john useast [EMAIL PROTECTED] wrote: Dear R friends: Sorry this might be a trivial question: I have about 8000 records with 11 variables in csv format. I did get it into R. head and tail all tell every record is in the memory. However, when i tried